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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
robstewart89
Advocate IV
Advocate IV

Grouping Multiple DAX measures into categories

Hi - saw a really good video over here: https://www.youtube.com/watch?v=iH3gW_vy69o



It gives a good insight into dynamically creating groupings. What i'm after though is to group multiple measures into a Gold/Silver/Bronze categorisation on a store level basis.

 

So for a Store to be "Bronze" it must have a minimum of 2 for Measure1, a minimum of 90% for Measure2 and minimum of 50% for Measure3. For a store to be silver it must have minimum 4,,95% and 75% respectively. And so on.

Is the best technique to look at the method in the link above and then combine it across the multiple measures or is there an easier way of doing this that i'm missing?

 

Thanks,

1 ACCEPTED SOLUTION
Phil_Seamark
Employee
Employee

HI @robstewart89

 

 

Using a Switch Statement over your measures might be the way to go.  Something along the lines of...

 

 

New Measure = 
    SWITCH(
True() ,
[Measure1] >= 6 && [Measure2] > 99 && [Measure3] > 80 , "Gold" ,
[Measure1] >= 4 && [Measure2] > 95 && [Measure3] > 75 , "Silver" ,
[Measure1] >= 2 && [Measure2] > 90 && [Measure3] > 50 , "Bronze" ,
"Other" )

 

 

 

 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Phil_Seamark
Employee
Employee

HI @robstewart89

 

 

Using a Switch Statement over your measures might be the way to go.  Something along the lines of...

 

 

New Measure = 
    SWITCH(
True() ,
[Measure1] >= 6 && [Measure2] > 99 && [Measure3] > 80 , "Gold" ,
[Measure1] >= 4 && [Measure2] > 95 && [Measure3] > 75 , "Silver" ,
[Measure1] >= 2 && [Measure2] > 90 && [Measure3] > 50 , "Bronze" ,
"Other" )

 

 

 

 

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Excellent @Phil_Seamark works perfectly! 

 

Thank you

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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