Forum Discussion
Anonymous
7 years agoNot applicable
Calculated column using multiple conditions
Hi I have columns in a table like Request type and Leave taken days but the request type as work from home should not to be consider as a leave. The maternity leave should not consider as a leav...
- 7 years ago
Anonymous
It seems that your days columns are datatype text.
Change them to number
- 7 years ago
Anonymous,
You may use DAX below.
Column = SWITCH ( 'LEAVE DETAILS'[Request type], "Work FromHome", 0, "Maternity leave", MAX ( 0, 'LEAVE DETAILS'[Leave taken days] - 150 ), "Marriage leave", MAX ( 0, 'LEAVE DETAILS'[Leave taken days] - 5 ) )
Anonymous
7 years agoNot applicable
HI,
error occurs,
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.
themistoklis
7 years agoCommunity Champion
Anonymous
It seems that your days columns are datatype text.
Change them to number