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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
Satishbang
New Member

Comparing 2 different columns and returning specific value

I have 2 different tables with similar value in a specific column, i used "lookupvalue" and did the comparision; however it returns the same compared value if its available and incase the value is not there it returns specific value.

 

My requirement is:  When 2 columns are compared and if the value matches, it should return specfic value, if not, another value 

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @Satishbang ,

You can create some measures like this:

 

if find in table1 =if( [Column2] in VALUES(Table1[Column1]) , 1 , 0 )
 
Result:
vchenwuzmsft_1-1649942072735.pngvchenwuzmsft_2-1649942167226.png

 

 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

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

3 REPLIES 3
v-chenwuz-msft
Community Support
Community Support

Hi @Satishbang ,

You can create some measures like this:

 

if find in table1 =if( [Column2] in VALUES(Table1[Column1]) , 1 , 0 )
 
Result:
vchenwuzmsft_1-1649942072735.pngvchenwuzmsft_2-1649942167226.png

 

 

Pbix in the end you can refer.

Best Regards

Community Support Team _ chenwu zhu

 

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

Tahreem24
Super User
Super User

@Satishbang  Try the LOOKUPVALUE dax by refering below link:

https://docs.microsoft.com/en-us/dax/lookupvalue-function-dax

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
amitchandak
Super User
Super User

@Satishbang ,
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.\

 

 

check if needed

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

Check out the July 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors