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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Rai_BI
Helper IV
Helper IV

Correct calculation for grand total

Hi, please, someone help me.

 

I have an issue as below.

How can I adjust the DAX measure below to also calculate the sum for the grand total?

I have the following DAX measure below, it works correctly for each line, but it is not calculating the total value of the grid which is returning empty. I'm trying to use the SUMX function but it's not working to calculate the grand total.

You can download the PBIX file here

 

Single Measure = 

VAR Seller_1_in_Scope = HASONEFILTER('customer table'[Name Seller1])
VAR Seller_2_in_Scope = HASONEFILTER('customer table'[Name Seller2])

RETURN
SWITCH(
    TRUE(),
    Seller_1_in_Scope && NOT Seller_2_in_Scope, 
    SUMX(
        VALUES('customer table'[Name Seller1]),CALCULATE([Goal Seller 1])),

    Seller_2_in_Scope && NOT Seller_1_in_Scope, 
    SUMX(
        VALUES('customer table'[Name Seller2]),CALCULATE([Goal Seller 2])),

    Seller_1_in_Scope && Seller_2_in_Scope, 
    SUMX(
        SUMMARIZE(
            'customer table',
            'customer table'[Name Seller1],'customer table'[Name Seller2]),
            CALCULATE([Goal Seller 1] + [Goal Seller 2])
)
)

 

Sem título.png

2 REPLIES 2
nareshr89
Helper II
Helper II

Try this 

Single Measure = [Goal Seller 1] + [Goal Seller 2]

Thank you, but it is not so easy, i need no check what column is in scope before calcate

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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