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
Tiago_Varela
Helper I
Helper I

SUM ALL VALUES EXCEPT

Hi all,

I have a problem, i'm triyng to sum all the values in a table, except the ones in another table.

Example:

 

Table 1

A = 10

B = 10

C = 30

D = 30

E = 50

f = 60

 

Table 2

B

D

 

So, i want the sum of A, C, E, F

 

Is there any dax formula for this?

Thanks

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Tiago_Varela

 

Try this

Sum_Value = CALCULATE(SUM('Table_A'[Value]),
                       FILTER('Table_A','Table_A'[ID]<>RELATED(Table_B[ID])))

 

 

 

Thanks
Raj

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Tiago_Varela

 

Try this

Sum_Value = CALCULATE(SUM('Table_A'[Value]),
                       FILTER('Table_A','Table_A'[ID]<>RELATED(Table_B[ID])))

 

 

 

Thanks
Raj

@Anonymous Do you have any idea why there is apostrophe'' for 'Table A' but nothing for Table B

which I could not refer to my Table B in your provided formula

@Anonymous Here is the similar model I am working on. I find that I could not put Table B in the formula

Sum with Filter 2.JPG

Thanks Raj

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.