Forum Discussion
surajde
3 years agoHelper I
Expression that yeild variant data-type error
Hi All, Need your help with below data type where I'm getting error when trying to apply a dax on Met as a conditional column. Sample Data: OPENED_DATE_CST RESTORED_DATE_CST CLOSED_DA...
- 3 years ago
Try
Met = IF ( 'AOTS Daily CSL 54 1'[TICKET_STATE] = "Cancel", "NA", IF ( OR ( 'AOTS Daily CSL 54 1'[TICKET_STATE] = "Closed", 'AOTS Daily CSL 54 1'[TICKET_STATE] = "Ready to Close" ), IF ( 'AOTS Daily CSL 54 1'[TTR_Hours] <= 'AOTS Daily CSL 54 1'[Target (Hours)], "1" ), IF ( 'AOTS Daily CSL 54 1'[OPENED_DATE_CST] + 'AOTS Daily CSL 54 1'[Days to Due Date] > TODAY (), "TBD", "0" ) ) )
johnt75
3 years agoSuper User
Your calculated column would return either text or an integer depending on which condition is met, that's not allowed. Instead of returning 0 or 1 return "0" or "1".
For the second error, you need to check the type of the GreaterThanOpenDue column. If that is a boolean column then you need to remove the " around True in the IF statement.