Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have a table with two columns: employees and their status.
What I'd like to do:
I'd like to classify the status into two categories: active and inactive.
I know I should create new table only with status and its assigned category, then make a relationship.
Questions:
Original table:
| employee | status |
| John | idle |
| William | 7861 |
| Anna | training |
| Frances | cleaning |
| Jason | #foo |
Table with categories:
| status | category |
| idle | inactive |
| 7861 | inactive |
| training | active |
| cleaning | active |
| #foo | inactive |
Solved! Go to Solution.
This catches everything except #foo, not sure of the parameters around #foo. Is it if it begins with a hashtag?
Column = IF(NOT(ISERROR(VALUE(LEFT([status],1)))) || [status] = "idle", "inactive", "active")
This catches everything except #foo, not sure of the parameters around #foo. Is it if it begins with a hashtag?
Column = IF(NOT(ISERROR(VALUE(LEFT([status],1)))) || [status] = "idle", "inactive", "active")
Thanks to you I also came up with solution that let's you calculate column based on first X letters e.g if value starts with "tr" it should be classified as "active".
Column =
SWITCH(
TRUE();
IF(NOT(ISERROR(VALUE(LEFT('status'[status];1))));TRUE();FALSE());"active";
SEARCH("idle";'status'[status];;0)>0;"inactive";
SEARCH("tr";LEFT('status'[status];2);;0)>0;"active";
"other-category")
Awesome! Glad I could be of assistance!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!