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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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 Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.