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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
How would I rank the following project IDs by these two categories? Small Projects and Large Projects. Project IDs with XXS - S are grouped into the Small category. Projects with M - XXXL are grouped into the Large category. I'm wondering how best to execute this in DAX...
| ID | Project size |
| 1 | XXXL |
| 3 | L |
| 6 | S |
| 8 | M |
| 25 | L |
| 57 | XS |
| 77 | L |
| 81 | |
| 98 | |
| 100 | |
| 127 | S |
| 136 | M |
| 137 | M |
| 162 | L |
| 165 | S |
| 166 | L |
| 174 | S |
| 188 | S |
| 189 | XS |
| 190 | L |
| 191 | M |
| 193 | XS |
| 197 | S |
| 198 | XS |
| 200 |
Solved! Go to Solution.
You can use a calculated column :
Project Size Group = IF([Project size] in {"XXS","XS","S"}, "Small", "Large")
(note, this can be done in PowerQuery as well, although with a different formula; you can access the instructions here: https://support.microsoft.com/en-au/office/add-a-conditional-column-power-query-f2422ed1-f565-4e64-b...)
Thanks, Vicky! This works well! Follow up question: what if I wanted to display the top 3 for both of those categories (Large vs. Small)?
You can use a calculated column :
Project Size Group = IF([Project size] in {"XXS","XS","S"}, "Small", "Large")
(note, this can be done in PowerQuery as well, although with a different formula; you can access the instructions here: https://support.microsoft.com/en-au/office/add-a-conditional-column-power-query-f2422ed1-f565-4e64-b...)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |