cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
sag_tyd
Frequent Visitor

Look up data and append to same row within table

Hello Experts,

 

I have an interesting use case where I have data contained in a table, but the data does not contain a certain level of information that I need for visualization purposes. I need to somehow search through the table based on one column and append the results of a different row to the original row. Bit hard to explain so here's an example:

 

I have the following data set:

IDNameFriend ID
1Alex3
2Joe3
3Bob1
4Phil2
5Marknull

 

I want to add a "Friend Name" column as such:

IDNameFriend IDFRIEND NAME
1Alex3Bob
2Joe3Bob
3Bob1Alex
4Phil2Joe
5Marknullnull

 

However, I cannot figure out how to do this. The iterative process of looking at each row individually and then searching through the table is tripping me up. 

 

Thanks for your help!

1 ACCEPTED SOLUTION
sevenhills
Super User
Super User

If you want the column in DAX, you can do as below: Say, your table is 

Parent_Child_Lookup

 

Friend Name = LOOKUPVALUE(Parent_Child_Lookup[Name], Parent_Child_Lookup[ID], Parent_Child_Lookup[Friend ID], BLANK())

 

sevenhills_0-1686163715500.png

 

View solution in original post

3 REPLIES 3
sevenhills
Super User
Super User

If you want the column in DAX, you can do as below: Say, your table is 

Parent_Child_Lookup

 

Friend Name = LOOKUPVALUE(Parent_Child_Lookup[Name], Parent_Child_Lookup[ID], Parent_Child_Lookup[Friend ID], BLANK())

 

sevenhills_0-1686163715500.png

 

That worked perfectly! Thank you very much! I knew it was something simple using the LOOKUPVALUE function, I just couldn't figure it out. Much appreciated. 

Glad to hear that it worked ! Thanks

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors