Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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...)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
56 | |
55 | |
54 | |
37 | |
29 |
User | Count |
---|---|
77 | |
62 | |
45 | |
40 | |
40 |