Forum Discussion
CASE WHEN Statement Using DAX Comparing a Text AND Number Column
- 2 years ago
Hi Kyle_Wolfe_Ohio DAX function SWITCH has some remarks, one of them is
- All result expressions and the else expression must be of the same data type
as seems your expression part is not single column (rather multiple columns: 'New Hire Orientation Dash Dataset'[Previous Pay Range], 'New Hire Orientation Dash Dataset'[Future Labor Union]...)
So basically, you should rework your calculation logic for this case, try with multiple IF as your input for SWITCH have different data type.
Link for documentation.
- Anonymous2 years ago
Hi some_bih ,thanks for the quick reply, I'll add further.
Hi Kyle_Wolfe_Ohio ,
Something like this?
The data type of the field 'pay range' should be Text.
Try modifying your expression:
Hi Kyle_Wolfe_Ohio DAX function SWITCH has some remarks, one of them is
- All result expressions and the else expression must be of the same data type
as seems your expression part is not single column (rather multiple columns: 'New Hire Orientation Dash Dataset'[Previous Pay Range], 'New Hire Orientation Dash Dataset'[Future Labor Union]...)
So basically, you should rework your calculation logic for this case, try with multiple IF as your input for SWITCH have different data type.
Link for documentation.