Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare 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
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
110 | |
107 | |
105 | |
90 | |
61 |
User | Count |
---|---|
169 | |
138 | |
135 | |
102 | |
86 |