cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Subtract 2 columns from different tables

Hi guys,

 

I have two tables:

Table A    (Supplier ID = 1,2,3,4,5,6,7)

Table B     (Supplier ID = 4,5,6)

 

I would like to filter out Supplier ID in Table B from Table A, so that I have only ID = 1,2,3,7 but I don't know how to go about it.

I'm new to DAX and any help would be appreciated. Thanks!                       

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User IV
Super User IV

Re: Subtract 2 columns from different tables

Table = 

  EXCEPT('TableA'[SupplierID],'TableB[SupplierID])


---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

3 REPLIES 3
Highlighted
Super User IV
Super User IV

Re: Subtract 2 columns from different tables

Table = 

  EXCEPT('TableA'[SupplierID],'TableB[SupplierID])


---------------------------------------

Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

Highlighted
Super User IV
Super User IV

Re: Subtract 2 columns from different tables

@Dmitroika 

except

new Table = except(Table1[Supplier Id], Table2[Supplier ID])

https://docs.microsoft.com/en-us/dax/except-function-dax



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
My Recent Blog -Week is not so Weak Connect on Linkedin

Proud to be a Super User!

Highlighted
Helper I
Helper I

Re: Subtract 2 columns from different tables

Thanks it worked!

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Top Solution Authors
Top Kudoed Authors