I have the following situation:
I would like to define number 0 to On Time, 2 to Delayed... but this SWITCH function doesnt support comparing values of type integer with values of type text...
Go to Solution.
Don't put the number in between inverted commas.
Column = SWITCH('Fact WaitingroomInsights'[Time],0,"On Time",2,"Delayed",-4,"Earlier than planned",8,"Other")
1) Only put text in between inverted commas.
2) If this doesn't work, make sure your the Time column's data type is Whole Number by going to Edit Queries.
View solution in original post
Take a look at the September 2023 Power BI update to learn more.
Join Microsoft Reactor and learn from developers.