Forum Discussion
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
Hi Satishbang ,
You can create some measures like this:
if find in table1 =if( [Column2] in VALUES(Table1[Column1]) , 1 , 0 )Result: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.
3 Replies
- amitchandakSuper 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 - Tahreem24Super User
Satishbang Try the LOOKUPVALUE dax by refering below link:
https://docs.microsoft.com/en-us/dax/lookupvalue-function-dax
- v-chenwuz-msftCommunity Support
Hi Satishbang ,
You can create some measures like this:
if find in table1 =if( [Column2] in VALUES(Table1[Column1]) , 1 , 0 )Result: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.