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.
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
ID | ID Exists in Table2? |
12345 | |
23456 |
Table2
Exchange ID | ID |
11111 | 12345 |
Any help would be greatly appreciated
Solved! Go to Solution.
@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")
@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.
@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")
Thank you! The second one worked for me.
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")
Thank you! This solution worked for us as well!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |