cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
lalTel20
Helper I
Helper I

percent of total in a group with external filters

Dear Experts, 

 

I wish to calculate a % of total value within a group. This percentage should also be updated based on slicers on the report. 

I wish to see a split of percentage based on advance orders. 

% Of Total Vol =
VAR curr = [Vol]
var base = CALCULATE([Vol], REMOVEFILTERS('DCM Data'[ADVANCE Orders]))
RETURN
DIVIDE ( curr, base )
//COMBINEVALUES(",", curr, base).
However, the totals do not add up .  Any help would be appreciated. 

 
Thanks,
Lalit
lalTel20_0-1660622180130.png

 

2 REPLIES 2
tamerj1
Super User
Super User

Hi @lalTel20 

please try

% Of Total Vol =
SUMX (
    VALUES ( 'DCM Data'[ADVANCE Orders] ),
    CALCULATE (
        VAR curr = [Vol]
        VAR base =
            CALCULATE ( [Vol], REMOVEFILTERS ( 'DCM Data'[ADVANCE Orders] ) )
        RETURN
            DIVIDE ( curr, base )
    )
)
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how the datamodel looks like, but please try the below if it suits.

 

% Of Total Vol =
VAR curr = [Vol]
VAR base =
    CALCULATE ( [Vol], ALLSELECTED ( 'DCM Data'[ADVANCE Orders] ) )
RETURN
    DIVIDE ( curr, base )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
November 2022 Update

Check it Out!

Click here to read more about the November 2022 updates!

Microsoft 365 Conference â__ December 6-8, 2022

Microsoft 365 Conference - 06-08 December

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors