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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.