cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sprague90
Frequent Visitor

Percent By Group - Cluster Column - Denominator Not Calculating Properly

Hi All,

 

I am having an continuing issue with grouping a cluster column chart and showing the percentages of each group.

 

Original Post: https://community.powerbi.com/t5/Desktop/Percent-By-Group-Cluster-Column-It-Works-Until-a-Filter-is/...

 

I have changed my measure to:

Cust% = 
VAR _catTot =
    CALCULATE (
        DISTINCTCOUNT ( 'Combined'[Shipment EXTERNAL ID] ),
        FILTER (
            ALL ( 'Combined' ),
            'Combined'[Destination Contact Name] = SELECTEDVALUE ( 'Combined'[Destination Contact Name] )
        )
    )
RETURN
    DIVIDE ( DISTINCTCOUNT ( 'Combined'[Shipment EXTERNAL ID]) , _catTot ) + 0

It still seems as though the denominator is not changing according to filter/slicer selections.

 

Any help on this would be greatly appreciated.

 

Thanks.

1 ACCEPTED SOLUTION
AlB
Super User III
Super User III

Hi @sprague90 

Try this modification to your measure:

Group% 2 = 
VAR _catTot2 = CALCULATE (
        DISTINCTCOUNT ( 'Sample Data'[ID] );
        ALL ( 'Sample Data'[Delivery Status] ) 
    )
RETURN
    DIVIDE ( DISTINCTCOUNT ('Sample Data'[ID]); _catTot2 ) + 0

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

View solution in original post

4 REPLIES 4
AlB
Super User III
Super User III

Hi @sprague90 

Can you share the pbix? or a simplified version that reproduces the problem? 

sprague90
Frequent Visitor

Hello, @AlB.

 

Here is an example file, private information changed to generic with a date slider.

 

https://drive.google.com/open?id=1gha9eP4pfvip-CKcvayEyGHG42T9W8TP

 

You'll notice as you change the date, the percentages start calculating wrong.

 

Thanks!

AlB
Super User III
Super User III

Hi @sprague90 

Try this modification to your measure:

Group% 2 = 
VAR _catTot2 = CALCULATE (
        DISTINCTCOUNT ( 'Sample Data'[ID] );
        ALL ( 'Sample Data'[Delivery Status] ) 
    )
RETURN
    DIVIDE ( DISTINCTCOUNT ('Sample Data'[ID]); _catTot2 ) + 0

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

View solution in original post

sprague90
Frequent Visitor

Amazing, thank you so much!

Helpful resources

Announcements
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Urdu Hindi D365 Bootcamp 768x460.png

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors