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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

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
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.