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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
cassels
Advocate I
Advocate I

Comparison between two different tables

Hi! I'm starting with powerBI and I need help.

 

I have a database with some devices, and other department create a report (Excel from SharePoint online) with the devices that they have (report independent from SQL) from another system.

What I want to do is create a comparison between the devices that I have in database and not in excel (and vice-versa). I want to do that as a Service, to update automatically (but now I don't know how to start and do the basic comparison).

I imported the tables from SQL and the table from the spreadsheet (Excel), and now I got stocked.

 

What I want first in the report is, for example: Devices in SQL not in Excel / Devices in Excel not in SQL

The second step would be: Devices in SQL not in Excel where Position is different from "Local"

 

Someone could help me with that please?
Thanks

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

You could create a copule Merge queries to do that. So, create a new Merge query and point it to both of your existing queries and do a Right Anti and then repeat and do a Left Anti.

 

 



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...

View solution in original post

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

You could create a copule Merge queries to do that. So, create a new Merge query and point it to both of your existing queries and do a Right Anti and then repeat and do a Left Anti.

 

 



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! Thank you for your help. 

 

So, I get data from SQL and Excel, and create a relationship. Now I am able to the comparison for one side filtering the blank values. The problem is that it doesn't happen the same way in the other side, and I can't figure out why.

 

If I had 'DC' with values and 'DeviceName' blank, I could do the same.

 

pbi.pngpbi2.png

 

 

 

About your solution, I will have to search how to do it. I'm new at PowerBI, but it seems to solve my problem.

 

Thank you again, I will try and let you know.

In the Query Editor on th Home tab look up in the upper right and you will see Merge Queries I would hit the arrow button and say Merge Queries as New in your case. At the bottom of the Merge Queries dialog there is an option for picking how you merge the queries together which is where you would pick Right Anti or Left Anti. Once you create the first one, just copy the query and change your Right Anti to a Left Anti.



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...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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