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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
kasife
Helper V
Helper V

From to between fact tables

Hello people,

I would like some help perhaps with modeling, I can't find a solution

I would like to make a comparison from one table to another. For example,

- table A: ID 1, ID 2, ID 3, ID 4, ID 5
- table B: ID 1, ID 2

Result : (3)    ID 3, ID 4, ID 5 

Would I have to do this through some modeling or could I do it via DAX? How could I get this result?

My modeling

kasife_0-1694459899130.png

 

1 ACCEPTED SOLUTION

@parry2k II think there was some detail missing that maybe I forgot because the value wasn't matching, so I used the following measurement and it worked. 

COUNTROWS(FILTER(_ccvs, NOT tableA[id] IN VALUES(tableA[id])))

Thanks so much

 

View solution in original post

8 REPLIES 8
parry2k
Super User
Super User

@kasife cool, if a problem is solved with the data you know, all good. 👍



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k Thank you so much

parry2k
Super User
Super User

@kasife add a new measure as below, you can use this as visual level filter where Count is not blank

 

Count = COUNTROWS ( EXCEPT ( VALUES ( TableA[ID] ), VALUES ( TableB[ID] ) ) )

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k II think there was some detail missing that maybe I forgot because the value wasn't matching, so I used the following measurement and it worked. 

COUNTROWS(FILTER(_ccvs, NOT tableA[id] IN VALUES(tableA[id])))

Thanks so much

 

parry2k
Super User
Super User

@kasife Is the comparison always from table a to table b, example you showed, id's are in table a and missing in table b, what if there is Id in table b and missing in table a? So is this comparison both way or one way?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2kI would like to see in table A the IDs that we did not find in table B. The logic is like this: My table A is a product reservation table and my table B is sales. So I want to know in my product reservation table what is not yet sold. I need to disregard what is on the sales table and only keep what is reserved

parry2k
Super User
Super User

@kasife it is easy to do but how do you want to visualize the data or do you want to create a new table with the exception?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k  I want to count and see which IDs I have in table A that I don't have in table B. I tried to show in a visual way the result I would like to obtain

kasife_0-1694468947045.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.