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
Atif
Resolver I
Resolver I

Filtered Total

Distribution = DIVIDE( DISTINCTCOUNT( Table1[Brand Availability]), CALCULATE( DISTINCTCOUNT( Table1[Store ID]), ALL(Table1)))
 
This formula is working fine, as each value gets divided by the Total Distinct Count. However, when a filter is applied, the Total Distinct Count gets filtered, but the numerator still gets divided by the Total Distinct Count rather than the Filtered Total Distinct Count.Untitled.png
1 ACCEPTED SOLUTION

Thank you, @DataInsights !

 

It is not displaying the exact percentages while using your formula. I will recheck later. Some filters are also applied, and it might be the cause.

 

I have already got the job done with a mere tweaking.

 

Distribution = DIVIDE( DISTINCTCOUNT( Table1[Brand Availability]), CALCULATE( DISTINCTCOUNT( Table1[Store ID]), ALL(Table1[Brand])))

View solution in original post

2 REPLIES 2
DataInsights
Super User
Super User

@Atif,

 

Try this measure. It uses ALLSELECTED, instead of ALL.

 

Distribution =
DIVIDE (
    DISTINCTCOUNT ( Table1[Brand Availability] ),
    CALCULATE ( DISTINCTCOUNT ( Table1[Store ID] ), ALLSELECTED ( Table1 ) )
)

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Thank you, @DataInsights !

 

It is not displaying the exact percentages while using your formula. I will recheck later. Some filters are also applied, and it might be the cause.

 

I have already got the job done with a mere tweaking.

 

Distribution = DIVIDE( DISTINCTCOUNT( Table1[Brand Availability]), CALCULATE( DISTINCTCOUNT( Table1[Store ID]), ALL(Table1[Brand])))

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.