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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors