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
TheCreepster1
Helper II
Helper II

Distinct Count based on percentage measure

Hi All,

 

Not sure if what I'm trying to achieve is possible but I have some information at Site/SKU level where I am performing some aggregate calculations that I then want to perform a distinct count on.

 

Below is some example data:

 

Example Data.PNG

 

The aggregate calculation looks to see if the site should have this SKU in stock, and places a 1/0 flag based on the result. It then calculates to see what % of SKUs are available:

 

Store Roll Up.PNG

 

Now those two bits I can do without problem, and they successfully change with any selected filters, but I'm trying to get to a point where I can see how many Sites fit within a percentage band to give a table like the below:

 

Band.PNG

 

I'm very new to DAX and Power BI so don't know if this is something that can be done? Any hints or pointers will be much appreciated.

 

 

1 ACCEPTED SOLUTION
jthomson
Solution Sage
Solution Sage

Some sort of nested IF would probably work for this if you've only got a small number of options to work with - something like:

 

PercentageGroup = if([currentpercentagemeasure]<0.6,"50-60%",if([currentpercentagemeasure]<0.7,"60-70%"

 

and so on

View solution in original post

1 REPLY 1
jthomson
Solution Sage
Solution Sage

Some sort of nested IF would probably work for this if you've only got a small number of options to work with - something like:

 

PercentageGroup = if([currentpercentagemeasure]<0.6,"50-60%",if([currentpercentagemeasure]<0.7,"60-70%"

 

and so on

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.