Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello,
I am trying to add a column that will report a value from a "Parent" record that is in the same table. In Excel, I would use an Index/Match formula to achieve that, but I cannot figure out a simple way of doing the same in Power Query.
What I have:
ID Parent ID Color
1 Red
2 Blue
3 1
4 2
What I need:
ID Parent ID Color Parent Color
1 Red
2 Blue
3 1 Red
4 2 Blue
Basically, it needs to look for the Parent ID in the ID column and return the Color as the Parent Color. I can use Merge Queries and merge and expand the same Query, but this method seems to be really slow (obviously, my actual data model is a lot more complex).
Thank you!
Solved! Go to Solution.
You may try LOOKUPVALUE Function in DAX.
Column = LOOKUPVALUE ( Table1[Color], Table1[ID], Table1[Parent ID] )
You may try LOOKUPVALUE Function in DAX.
Column = LOOKUPVALUE ( Table1[Color], Table1[ID], Table1[Parent ID] )
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 55 | |
| 35 | |
| 31 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 75 | |
| 72 | |
| 38 | |
| 35 | |
| 25 |