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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
talaespinosa
Frequent Visitor

Differences between two columns from different tables

Hello, I am trying to figure out how can I create a measure that list (and eventually counts its elements) the differences between two columns from different tables where certain filters were applied.
result from filter table 1:

3
85
86
719

result from filter table 2:

3
4
5
67
82
85
86
90

expected result 1:

4
5
67
82
90

expected result 2: 5 different elements
Thanks in advance!

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

Hi, @talaespinosa 

It is recommended to use calculated table rather than mesaaure to display the result.

Please try formula like:
Calculated Table:

Result1 = 
 var filter1=SELECTCOLUMNS(FILTER(Table1,<filter1>&&<filter2>....),"column",Table1[Column1])
 var filter2=SELECTCOLUMNS(FILTER(Table2,<filter1>&&<filter2>....),"column",Table2[Column2])
 return  EXCEPT(filter2,filter1)

Measue:

Result2 = 
 var a1=COUNT(Result1[column])
 var b1=CALCULATE(DISTINCTCOUNT(Table2[Column2]),FILTER(Table2,<filter1>&&<filter2>))
 return b1-a1&":"&a1

If it doesn't work, please share a sample file for further research.

Best Regards,
Community Support Team _ Eason

View solution in original post

2 REPLIES 2
v-easonf-msft
Community Support
Community Support

Hi, @talaespinosa 

It is recommended to use calculated table rather than mesaaure to display the result.

Please try formula like:
Calculated Table:

Result1 = 
 var filter1=SELECTCOLUMNS(FILTER(Table1,<filter1>&&<filter2>....),"column",Table1[Column1])
 var filter2=SELECTCOLUMNS(FILTER(Table2,<filter1>&&<filter2>....),"column",Table2[Column2])
 return  EXCEPT(filter2,filter1)

Measue:

Result2 = 
 var a1=COUNT(Result1[column])
 var b1=CALCULATE(DISTINCTCOUNT(Table2[Column2]),FILTER(Table2,<filter1>&&<filter2>))
 return b1-a1&":"&a1

If it doesn't work, please share a sample file for further research.

Best Regards,
Community Support Team _ Eason

lbendlin
Super User
Super User

You are missing 719 from the first table.

 

Pseudo code:

 

UNION(EXCEPT(Table 1, Table 2),EXCEPT(Table 2, Table 1))

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.