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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Ramendra
Helper IV
Helper IV

Vlookup to identify non matching values between two tables

Dear Team, 

 

Could you please help me to know, 

How to apply Vlookup to identify non matching values between two tables in power bi. 

Ex. 

I have a table with 100 asset serial numbers and thier locations. 

I have another table with 49 serial number

And thier locations with active status. 

Now I want to get and show 51 non matching serial numbers with thier location from first table to show the remaining assets in stock. 

 

I would like to use matrix and table view. 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Ramendra,

In my opinion, I'd like to suggest you write a measure formula with 'except', 'intersect' functions to extract not matched values then you can use this list to compare with the current value and return tag.
After these steps, you can use this measure in the visual level filter to filter not matched records.

Measure =
VAR list =
    EXCEPT (
        UNION ( ALL ( Table1[serial number] ), ALL ( Table2[serial number] ) ),
        INTERSECT ( ALL ( Table1[serial number] ), ALL ( Table2[serial number] ) )
    )
RETURN
    IF ( SELECTEDVALUE ( Table1[serial number] ) IN list, "Y", "N" )

Regards,

Xiaoxin Sheng

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

My suggestion would be to use the Merge feature of the Query Editor.  To get further help, share data in a form that can be pasted in an MS Excel workbook. 


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

Hi @Ramendra,

In my opinion, I'd like to suggest you write a measure formula with 'except', 'intersect' functions to extract not matched values then you can use this list to compare with the current value and return tag.
After these steps, you can use this measure in the visual level filter to filter not matched records.

Measure =
VAR list =
    EXCEPT (
        UNION ( ALL ( Table1[serial number] ), ALL ( Table2[serial number] ) ),
        INTERSECT ( ALL ( Table1[serial number] ), ALL ( Table2[serial number] ) )
    )
RETURN
    IF ( SELECTEDVALUE ( Table1[serial number] ) IN list, "Y", "N" )

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@Ramendra ,

Found example how to get a value in new column from another table

 

example of trying to get a value in the sales table from date table -Blank means values not found. prefer on 1-M

Month Name = LOOKUPVALUE('date'[Month Year],'date'[Date],Sales[Sales Date])

 

example, getting City data from geography to sales -Blank means values not found.

City Name = maxx(FILTER(geography,geography[City Id]=Sales[City Id]),geography[City])

 

or city count from sales to geography -Blank means values not found.

City count= countx(FILTER(Sales,geography[City Id]=Sales[City Id]),Sales[City])

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak , I am not sure how to do that.
I am trying to attach exel with raw data but not able to find option here.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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