Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

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/m-p/790863

 

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.

  • AlB's avatar
    AlB
    7 years ago

    Hi Anonymous 

    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

4 Replies

  • AlB's avatar
    AlB
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous 

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

      • AlB's avatar
        AlB
        Icon for Community Champion rankCommunity Champion

        Hi Anonymous 

        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