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

DAX - EXCEPT

Hi, I would like to get the Distinct value from 2 tables ( After tableA EXCEPT tableB) --> the result should be "A"

However I would like to set a expression for TableA as 

 

All(TableA)

 

TableA
Item
A
A
B
C
C
D

 

TableB
ItemDate
B1/1/2023
C1/1/2023
C1/1/2023
C1/1/2023
D1/1/2023

 

Here is how I try but not working

 

EXCEPT(
CACULATE(VALUES(TableA[Item]), ALL(TableA),
VALUES(TableB[Item]))

 

 

May I seek some advise?

Thanks so much 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , you need a new table

 

 

New table = except(all(TableA[Item]), distinct(TableB[Item]) )

 

other wise you need a common table to plot a measure

 

countrows(except(all(TableA[Item]), distinct(TableB[Item]) ) )

 

https://amitchandak.medium.com/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-solution-8e3eccb41bda

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Mahesh0016
Super User
Super User

@Anonymous 

Mahesh0016_0-1672146312722.png

 

 

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

View solution in original post

2 REPLIES 2
Mahesh0016
Super User
Super User

@Anonymous 

Mahesh0016_0-1672146312722.png

 

 

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

amitchandak
Super User
Super User

@Anonymous , you need a new table

 

 

New table = except(all(TableA[Item]), distinct(TableB[Item]) )

 

other wise you need a common table to plot a measure

 

countrows(except(all(TableA[Item]), distinct(TableB[Item]) ) )

 

https://amitchandak.medium.com/power-bi-when-i-asked-you-to-create-common-tables-a-quick-dax-solution-8e3eccb41bda

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

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.