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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Lookup for value of one column to another column in same table

Hi,

 

I have two columns which is column 1 and column 2 in same table. here, i want achieve that column 1 value look for the value in  Cloumn 2 , if it is matching then it should return "Yes" else "No". 

I am expecting similar to VLOOOKUP(Excel functionality) function in Power BI for same table.

 

Please help on this.

 

Thanks,

 

1 ACCEPTED SOLUTION

you can try this formula

Expected Column = CONTAINS(Table1,Table1[Column 2],Table1[Column 1]).

 

View solution in original post

5 REPLIES 5
quentin_vigne
Solution Sage
Solution Sage

Hi @Anonymous

 

You can use a IF() function ?

 

If it doesn't work, can you please provide us a sample of you data so that we make it work ? 

 

Quentin

Anonymous
Not applicable

Hi I have the same scenario but in a direct query but lookupvalue contains, related doesn't work while creating a column.

 

Could you help me with driving this issue?

 

Thankyou

kng

Column1Column2

Table 1 
 IDABC 
 17683739 
 28790111 
 37683739 
    
    
Table 2Column1Column2Column3
 IDABCFlag
 17649463Yes
 27649463No 
 37635353Yes
Anonymous
Not applicable

Hi Quentin,

 

Thanks for looking into this.

 

IF() function doen't work here. suppose if i wanted careate Tablular visual same as you see below.

 

Here , i have to create  calcualted field(Expcted Column) to do vlookup flag "Yes" if value of Column 1 is found Column 2, else "No" if value of Column 1 not found in Column 2 .

Column 1       Column 2        Expected Column

-----------     -------------      --------------------

 a1                     x1                      Yes

 b1                     y1                      No

 c1                     z1                       No

d1                      a1                       Yes

e1                      d1                      No

 

looking forward for your responce.

 

Thanks, 

Ganesh

 

you can try this formula

Expected Column = CONTAINS(Table1,Table1[Column 2],Table1[Column 1]).

 

Anonymous
Not applicable

Thanks Hasan...!

 

It's working.

 

Best Regards,

Ganesh

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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