Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello Folks,
I have something like this, as you can see I have 2 columns. The code 703, 600, 603, 714, and 806 categorized has "Unplaned hours". The rest, we categorized it has "Vacation hours". So, I created a column measure - Categories.
I use SWITCH function:
Categories = Switch (true(), timetbl[code]<=600, "Unplaned hours")
No, that doesn't work! So, does it mean that i have to list every single code in my dax? Something like:
Categories = Switch (true(), timetbl[code]=600, "Unplaned hours", imetbl[code]=603, "Unplaned hours"...
Please help. Thank you!
Text | Code |
Sick | 703 |
Family Sick | 600 |
Injury | 603 |
Breament Leave | 714 |
Half Sick Paid | 806 |
Floating Holiday | 800 |
Vacation | 801 |
Solved! Go to Solution.
You should be able to write one of these column expressions
Categories = Switch (true(), timetbl[code]<=600, "Unplanned hours", "Vacation Hours")
or
Categories = IF(timetbl[code]<=600, "Unplanned hours", "Vacation Hours")
You could also just use a Groups column too, to categorize codes into different buckets.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
You should be able to write one of these column expressions
Categories = Switch (true(), timetbl[code]<=600, "Unplanned hours", "Vacation Hours")
or
Categories = IF(timetbl[code]<=600, "Unplanned hours", "Vacation Hours")
You could also just use a Groups column too, to categorize codes into different buckets.
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Thank you!
User | Count |
---|---|
141 | |
113 | |
104 | |
78 | |
64 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |