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
Anonymous
Not applicable

Grand Total excluding data

Hi,

 

I have a table A having Product and Value.

 

Product   Value

A                55

B                64

C                78

D                99

E                 120

F                 180

 

I have implemented a formula to calculated Grand Total: Calculate(SUM(value),all(A)) Using this formula I am getting grand total value, however I want to exclude Product D from the grand total, I am not getting the correct syntax here.

 

Grand Total: 596

 

I am looking to get Without  D grand Total: 497

 

Any help.

 

Thanks,

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

 

You can try to use following measure formula to achieve your requirement:

Change Grand Total = 
IF (
    ISINSCOPE ( 'Table'[Product] ),
    SUM ( 'Table'[value] ),
    CALCULATE (
        SUM ( 'Table'[value] ),
        FILTER ( ALLSELECTED ( 'Table' ), [Product] <> "D" )
    )
)

17.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @Anonymous,

 

You can try to use following measure formula to achieve your requirement:

Change Grand Total = 
IF (
    ISINSCOPE ( 'Table'[Product] ),
    SUM ( 'Table'[value] ),
    CALCULATE (
        SUM ( 'Table'[value] ),
        FILTER ( ALLSELECTED ( 'Table' ), [Product] <> "D" )
    )
)

17.PNG

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
AlB
Super User
Super User

Hi @Anonymous

 

If I understand correctly what you need,the following measure would suffice:

 

Measure_Total = SUM(A[Value])

 

You can place this measure in a card visual on your report and apply a slicer with A[Product]. On the slicer, you can deselect "D" and you will get the sum of all the others.   

Anonymous
Not applicable

No this may not work when you calculate percentage of each and every product level. 

Hi @Anonymous

 

You can try the following measure

Without D = CALCULATE(SUM(A[ Value]),FILTER(ALL(A),A[Product ]<>"D"))

I have got the below result 

Total Without DTotal Without D

You can also download the pbix file here

 

If this helped you, please mark this post as an accepted solution and like to give KUDOS .

 

Regards,

Affan

 

 

 

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.