Showing results for 
Search instead for 
Did you mean: 
Bhavyapj Frequent Visitor
Frequent Visitor

Percentage not showing correctly in Power BI Matrix

Hi All,


I need to show Distribution and OOS of products in 2 different tables.



Blank, Pending delivery and shelf replenished are OOS Reasons which I have added to matrix column value.

These are the 2 measures that I have created to calculate the Percentage of Distribution and OOS:

Distribution% = divide(Sum('Distribution&OOS'[Distribution]),calculate(COUNTROWS('Distribution&OOS')),0)

OOS% = divide(Sum('Distribution&OOS'[OOS]),calculate(COUNTROWS('Distribution&OOS')),0)


Distribution works fine, but OOS for different categories are not calculated like I expected.


 In the second screenshot above, OOS% for Pending delivery comes up as 100% . whereas it should be as per screenshot below. 

It should be compared with all the records in the table, not just Pending delivery Products.

total of distribution and OOS for a Product should be 100%.


This is measure that I have created to get the above values which works fine but the denominator doesn't change when I apply slicers/filters.

OOSReason% = divide(Sum('Distribution&OOS'[oos]),calculate(COUNTROWS('Distribution&OOS'),Allexcept('Distribution&OOS','Distribution&OOS'[Product],'Distribution&OOS'[Workweek])),0)


I want this to be dynamic. 

Please help me resolve this.