Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
104 | |
98 | |
97 | |
38 | |
37 |
User | Count |
---|---|
153 | |
122 | |
75 | |
73 | |
64 |