Forum Discussion
Need a semi complex if / Else statement
Thank you. Came back with another error - The syntax for 'Table' is incorrect. (DAX(IF ( AND ( [% Completed] > 0, [% Completed] < .661 ), "Learning Started", IF ( AND ( [% Completed] > .66, [% Completed] < 1 ), "Knowledge Stage Completed", SWITCH ( VALUE ( Table [% Completed] ), 1, "100% Completed", 0, "Not Started", "", "Account Created, Not Started" ) )))).
I couldn't find an expression called Table
Hi Anonymous,
Table means your table name who host the column.(where [% Completed] field exists)
Regards,
Xiaoxin Sheng
- Anonymous7 years agoNot applicable
Doh. Forrest for the trees....
- Anonymous7 years agoNot applicable
Column = IF ( AND ( [% Completed] > 0, [% Completed] < .661 ), "Learning Started", IF ( AND ( [% Completed] > .66, [% Completed] < 1 ), "Knowledge Stage Completed", SWITCH ( VALUE ( Table[% Completed] ), 1, "100% Completed", 0, "Not Started", "", "Account Created, Not Started" ) ) )I'm now seeing a Function 'SWITCH' does not support comparing values of type Number with values of type Text error. Consider using the VALUE or FORMAT function to convert one of the values. I tried formatting the column (which was set to Decimal Number and General) to Decimal Number and Decimal Number - didn't help.