Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Alta88
Helper IV
Helper IV

Ranking Project Items by Size

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...

 

IDProject size
1XXXL
3L
6S
8M
25L
57XS
77L
81 
98 
100 
127S
136M
137M
162L
165S
166L
174S
188S
189XS
190L
191M
193XS
197S
198XS
200 
1 ACCEPTED SOLUTION
vicky_
Super User
Super User

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...

View solution in original post

2 REPLIES 2
Alta88
Helper IV
Helper IV

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)?

vicky_
Super User
Super User

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...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.