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! Learn more

Reply
bboy0009
Helper II
Helper II

compare 2 columns from 2 fact tables

Hi guys,

 

I have 2 Facts tables (A and B) which have a same column TransactionCode. I would like to know , for each line, if TransactionCode of the table A has a same value in the column TransactionCode of the table B. If there is not match, I would like to display these transaction in a visual. 

 

I can not create a relationship between A and B.  

 

I'll take every solution, from Power Query or dax 🙂

 

Thank you and have a nice day !

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @bboy0009 , 

Please refer to my steps.

Merge queries as new.

vpollymsft_0-1668133641426.png

 

Then add an conditional column.

vpollymsft_1-1668133695534.png

vpollymsft_2-1668133731354.png

If I have misunderstood your meaning, please provide more details with the desired output and pbix file without privacy information.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @bboy0009 , 

Please refer to my steps.

Merge queries as new.

vpollymsft_0-1668133641426.png

 

Then add an conditional column.

vpollymsft_1-1668133695534.png

vpollymsft_2-1668133731354.png

If I have misunderstood your meaning, please provide more details with the desired output and pbix file without privacy information.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

bboy0009
Helper II
Helper II

I thought about compare each transaction of A to a list of all transaction of B and if the list contains then add "Yes" in the new column in the table A. I'm searching how to do this in M and it's kind of complicated

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