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!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
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...)
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 58 | |
| 57 | |
| 42 | |
| 17 | |
| 17 |
| User | Count |
|---|---|
| 113 | |
| 108 | |
| 38 | |
| 35 | |
| 26 |