Forum Discussion
Anonymous
6 years agoNot applicable
Conditonal Column based on Calculated Columns
Hi, I have a table, where I have created 3 calculated columns, that tell me if that ID appears in another table. Looks like this: What I want to do is add another column that would ca...
- Anonymous6 years ago
Hi Anonymous ,
i missed an &
Try this
Calculated Column = VAR a = 'Table'[archivingvehicles] VAR b = 'Table'[deleting vehicles] VAR c = 'Table'[invoicingvehicles] RETURN SWITCH ( TRUE (), a = 1 && b = 0 && c = 0, "A", a = 1 && b = 1 && c = 0, "A,D", a = 1 && b = 1 && c = 1, "A,D,I", a = 0 && b = 1 && c = 0, "D" )Regards,
Harsh Nathani
Anonymous
6 years agoNot applicable
Anonymous Thank you.
I have tried it and I get this error. Are you able to help, I have not used this function before.
"DAX comparison operations do not support comparing values of type Text with values of type Integer. Consider using the VALUE or FORMAT function to convert one of the values."
The three columns were a Data Type of 'Number', I tried changing them to Text but that hasn't resolved it.
Thank you for your help
Anonymous
6 years agoNot applicable
Hi Anonymous ,
i missed an &
Try this
Calculated Column =
VAR a = 'Table'[archivingvehicles]
VAR b = 'Table'[deleting vehicles]
VAR c = 'Table'[invoicingvehicles]
RETURN
SWITCH (
TRUE (),
a = 1
&& b = 0
&& c = 0, "A",
a = 1
&& b = 1
&& c = 0, "A,D",
a = 1
&& b = 1
&& c = 1, "A,D,I",
a = 0
&& b = 1
&& c = 0, "D"
)
Regards,
Harsh Nathani