March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe 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
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:
ID | Name | Friend ID |
1 | Alex | 3 |
2 | Joe | 3 |
3 | Bob | 1 |
4 | Phil | 2 |
5 | Mark | null |
I want to add a "Friend Name" column as such:
ID | Name | Friend ID | FRIEND NAME |
1 | Alex | 3 | Bob |
2 | Joe | 3 | Bob |
3 | Bob | 1 | Alex |
4 | Phil | 2 | Joe |
5 | Mark | null | null |
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!
Solved! Go to Solution.
If you want the column in DAX, you can do as below: Say, your table is
Friend Name = LOOKUPVALUE(Parent_Child_Lookup[Name], Parent_Child_Lookup[ID], Parent_Child_Lookup[Friend ID], BLANK())
If you want the column in DAX, you can do as below: Say, your table is
Friend Name = LOOKUPVALUE(Parent_Child_Lookup[Name], Parent_Child_Lookup[ID], Parent_Child_Lookup[Friend ID], BLANK())
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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
123 | |
85 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |