This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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...)
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 28 | |
| 23 | |
| 22 | |
| 16 | |
| 16 |
| User | Count |
|---|---|
| 60 | |
| 35 | |
| 28 | |
| 22 | |
| 21 |