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!
User | Count |
---|---|
93 | |
90 | |
90 | |
81 | |
49 |
User | Count |
---|---|
160 | |
145 | |
102 | |
72 | |
55 |