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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

EXCEPT function not returning the correct details

I have two tables which are formed by extracting one similar column(STORY ID) from two different multicolumn tables. The two tables are like below:

nitin_bhatnagar_0-1669027508272.png

 

Now, I want to calculate the difference between these two and find the ones in second table that are not present in first table.

I am trying using EXCEPT('ON END STORIES', 'ON START STORIES') but this is giving me no result and just showing as blank. Is there anything I am missing here?

 

5 REPLIES 5
serpiva64
Solution Sage
Solution Sage

Hi,

i think that you are in the right way

serpiva64_0-1669028952543.png

I made some tests and with your data you should get blank if you swap your tables.

serpiva64_1-1669029625839.png

on other cases you should get errors (column type ecc.)

If this post is useful to help you to solve your issue consider giving the post a thumbs up 

 and accepting it as a solution !

 

 

 

amitchandak
Super User
Super User

@Anonymous , Try only for Id

 

EXCEPT(Distinct('ON END STORIES'[Story ID]) , Distinct('ON START STORIES''[Story ID]))

 

This will not compare other columns

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

Still no luck. Now if I try just on one column, I am getting all the ids from second table and not the difference between the two. It should calculate the difference between the two and return which are present in second and not the ones in first.

@Anonymous , In that case, second table to be first

EXCEPT(Distinct('ON START STORIES''[Story ID]),Distinct('ON END STORIES'[Story ID]) )

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

The result is still not coming right. I think the relationship mapping is getting ignored while finding the distinct items based upon id(may be other columns hold different values in different tables for same unique id on different dates).

 

Is it somehow possible to compare the two tables based upon unique id only while keeping other columns intact in the resultant differential table and select rest of the other columns from the second table? This way, I can find the differential ids and then their related columns from second table that follows the managed relationship(operation is: second-first, where both have multiple columns that change values except the ids). 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors