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
hemasnaidu
New Member

Compare 2 tables and return results

Hi, I have 2 tables: 

Table 2 able to link to Table 1 using 'Table1ID'.

I want to have 2 results... UnMatch and Match as below 

 

Adding logics:

The match are only for State='DOWN'. For other than State='DOWN', can be ignored.

For any State = 'DOWN' in Table 1, it should have a follow up record in Table 2. 

In Table2, each new record referenced to Table1 using 'Table1ID' column. 

 

hemasnaidu_0-1718295038440.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @hemasnaidu 

 

You can use Merge queries feature. For match results, select Inner Join kind. For unmatched results, select Left Anti kind. Then select rows with State 'DOWN'. Use Merge Queries as New to have match and unmatch results in new queries separately. You can see an example in the attached pbix file.  

vjingzhanmsft_0-1718333305517.png

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

View solution in original post

3 REPLIES 3
lbendlin
Super User
Super User

what is the logic for your unmatch?  What happened to 11111 and 44444 ? Should the State="UP"  be ignored?

Added this logics to original post 

 

Adding logics:

The match are only for State='DOWN'. For other than State='DOWN', can be ignored.

For any State = 'DOWN' in Table 1, it should have a follow up record in Table 2. 

In Table2, each new record referenced to Table1 using 'Table1ID' column. 

Anonymous
Not applicable

Hi @hemasnaidu 

 

You can use Merge queries feature. For match results, select Inner Join kind. For unmatched results, select Left Anti kind. Then select rows with State 'DOWN'. Use Merge Queries as New to have match and unmatch results in new queries separately. You can see an example in the attached pbix file.  

vjingzhanmsft_0-1718333305517.png

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

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.

Top Solution Authors