Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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 FABINSIDER for a $400 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
70 | |
66 | |
50 | |
31 |
User | Count |
---|---|
116 | |
99 | |
75 | |
65 | |
40 |