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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors