cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
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
Super User II
Super User II

@Atif,

 

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

 

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

 

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

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors