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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.