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
mbpaul
Frequent Visitor

Compare two tables and include rows that don't match

Hello, I am fairly new to PowerBi and I am feeling like this should be a fairly easy answer but for some reason I can't wrap my head around the logic to get it to display the way that I want. I have two tables that I am trying to do a comparison of hours from our two time keeping systems to ensure they are reconcilled. 

Table 1

EquipmentJobDateHours
AC017Sample2021-05-1710
AC017Sample2021-05-188
AC017Sample2021-05-206
AC025Sample2021-05-1710
AC025Sample2021-05-2010

Table 2

ProjectCodeWorkDateResourceIDHours
Sample2021-05-17AC0177
Sample2021-05-18AC01710
Sample2021-05-19AC1710
Sample2021-05-20AC0176
Sample2021-05-17AC02510
Sample2021-05-20AC02510

Desired Output:

Slicer: Date range

Slicer: Project

Slicer: Equipment Code

DateEquipment CodeTable 1 HoursTable 2 HoursDifference
2021-05-17AC0171073
2021-05-18AC0178102
2021-05-19AC17 1010
2021-05-20AC017660
2021-05-17AC02510100
2021-05-20AC02510100

 

I have tried a number of things to get it to work but I can't seem to get it to do just what I want. I tried to create a merged column "Date-Equip-Job" in both tables and use that as a relationship but it only brings in matching rows and not rows that may be in one table and not the other (for example, row 3 in desired (AC17) would be excluded). 

I have also tried using a calendar table to filter but then the tables do not link together properly and I get hours from the same date but not the same unit on the line item and I can't seem to create a relationship due to ambiguity.

This seems like it should be a really easy thing to do but it has me stumped and I haven't been able to find a forum post that has helped.

 

2 ACCEPTED SOLUTIONS
Fowmy
Super User
Super User

@mbpaul 

Simple merging in PQ should work for you if I understood your issue correctly. I attached the file.
You also try the Fuzzy Merge option if you want to merge based on partial matching.

Fowmy_0-1622234166564.png

Fowmy_1-1622234178769.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Fowmy
Super User
Super User

@mbpaul 

Simple merging in PQ should work for you if I understood your issue correctly. I attached the file.
You also try the Fuzzy Merge option if you want to merge based on partial matching.

Fowmy_0-1622234166564.png

Fowmy_1-1622234178769.png

 

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Greg_Deckler
Community Champion
Community Champion

@mbpaul Not sure I am following this entirely but seems to me that you want an inverse selector or a complex selector:

Inverse Selector - Microsoft Power BI Community

The Complex Selector - Microsoft Power BI Community

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi Greg,

 

Thanks for the quick response. I am not overly concerned about the selectors as I am using them just as basic filters and ultimately I want to be able to show all data. My big issue is just getting the data to relate properly so it displays all the information. I have no problem comparing the rows in the 2 tables if the equipment number is the same in both tables (Desired outputs: row 1,2,4,5,6). My issue is getting it to display if the equipment number does not show up in both tables for example in 'Desired outputs: row 3'. The unit number was entered as AC17 instead of AC017 in table 2. I get rows 1,2,4,5,6 in my visual but I can't seem to get row 3.  

 

I hope that makes sense.

Michael

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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