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

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

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.