Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
94 | |
75 | |
63 | |
62 |
User | Count |
---|---|
137 | |
105 | |
104 | |
80 | |
63 |