I have created a custom column, which generates a 1 or 0 for each field based on a simple if statement, that I've defined as a Logical Data type.
My issue is that when applied and viewed in Power BI as a Data table the column is entirely empty and generates a data type error. However, if I simply change the data type to "Int64.Type" then it works fine.
Hopefully someone can tell me where this is going wrong please?
My issue is that when applied and viewed in Power BI as a Data table the column is entirely empty and generates a data type error. However, if I simply change the data type to "Int64.Type" then it works fine.
Hopefully someone can tell me where this is going wrong please?
Power Query:
#"Mrg: dim_cust_inter_cmpny" = Table.NestedJoin(#"Table1", {"CustName"}, dim_cust_inter_cmpny, {"Customer"}, "dim_cust_inter_cmpny", JoinKind.LeftOuter),
#"Expd: dim_cust_inter_cmpny" = Table.ExpandTableColumn(#"Mrg: dim_cust_inter_cmpny", "dim_cust_inter_cmpny", {"Inter Company"}, {"dim_cust_inter_cmpny.Inter Company"}),
#"Cus_Col: Inter_Co" = Table.AddColumn(#"Expd: dim_cust_inter_cmpny", "Inter_Co",
each if [dim_cust_inter_cmpny.Inter Company] = "Y" then 1
else 0, Logical.Type)