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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
jcawley
Helper III
Helper III

New to BI, VLookup alternative?

Hello,

 

I'm new to Power BI and trying to... Make a V-Lookup of sorts. How can I create a column that looks to see if a value on table1 appears in a table2 in a different column? I just would like it to return "Yes" or "No" depending if the value exits.

Table1

IDID Exists in Table2?
12345 
23456 

 

Table2

 

Exchange IDID
1111112345

 

Any help would be greatly appreciated

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jcawley , A new column in Table 1,

 

In case tables are related 1-M from Table1 to table 2

if(isblank(realted(Table2[ID])),"No", "Yes")

 

Or

 

if(isblank(countx(filter(Table2, Table2[ID] =Table1[ID]),Table2[ID])),"No", "Yes")

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

5 REPLIES 5
amaleranda
Post Patron
Post Patron

@jcawley ,

 

Below is calcualted column is based on one to many relationship based between Tabel1(One) and Tabel 2(Many).

 

Please accepet it as a solution if it fits your requirment.

 

Answer1.PNG

amitchandak
Super User
Super User

@jcawley , A new column in Table 1,

 

In case tables are related 1-M from Table1 to table 2

if(isblank(realted(Table2[ID])),"No", "Yes")

 

Or

 

if(isblank(countx(filter(Table2, Table2[ID] =Table1[ID]),Table2[ID])),"No", "Yes")

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Thank you! The second one worked for me.

az38
Community Champion
Community Champion

Hi @jcawley 

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

or calculate countrows. in your case it will be like

Column = 
var _isValue = CALCULATE(COUNTROWS(Table2), FILTER(Table2, Table2[ID] = EARLIER(Table1[ID])) )
RETURN
IF(_isValue > 0, "yes", "no")

 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Thank you! This solution worked for us as well!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.