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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.