cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
simon_boniz
New Member

Retrive value of the first column looking at the values in the rest of the row

Hi All,

 

I have 2 tables, not linked to eachother (they cannot be linked).

Table 1 contain the database and all values are unique.

Table 2 contains the observation made. for each observation I want to look into table 1 is the observation is in in there and if yes I want name1 returned. 

Table 2 may can contain dulicates.

 

Has anyone any suggestions?

 

simon_boniz_0-1657893309580.png

 

2 REPLIES 2
simon_boniz
New Member

I m not sure about pivoting and unpivoting the tables. I did not quite understand it. 

 

so this is what I did

 

if(ISBLANK(LOOKUPVALUE(name1,name1,Observation) == FALSE(),LOOKUPVALUE(Name1,Name1,Observation),
if(ISBLANK(LOOKUPVALUE(Name1,Name2,Observation)) == FALSE(),LOOKUPVALUE(Name1,Name2,Observation),
#Repeat for the other columns,
#finally use blank() to leave a blank cell in case a value was not found.
 
blank()))))
amitchandak
Super User
Super User

@simon_boniz , You can unpivot table 2, You will have the name and observation. Then you join them in model and use in visual

 

or merge in power query

 

https://radacad.com/pivot-and-unpivot-with-power-bi

Append : https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors