I created new columns from if/then/else formulas where the output is either a number or null, but I can't aggregate them without getting an error saying that this new column that I'm trying to aggregate is a string. What can be the possible causes for this?
Created them in the transformation tab. Trying to aggregate them in the report in DAX. I created them with this kind of formula
= Table.AddColumn(#"Added Custom44", "Pure Connect Res", each if [Product Sales TGT] = "Pure Connect Res" then 1 else if [Product Sales TGT] = "Conventional Line Res" then 1 else 0)
Solved! Go to Solution.
@nickspizza , Make sure data type of this column is numeric like whole number or decimal in power query
@nickspizza , Make sure data type of this column is numeric like whole number or decimal in power query
Okay thank you. I didn't know that you need to manually choose the data type for every column after creating it in Transformation. It seems to work