Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

We'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

Reply
huguest
Advocate II
Advocate II

Index/Match equivalent (same query)

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!

1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@huguest,

 

You may try LOOKUPVALUE Function in DAX.

Column =
LOOKUPVALUE ( Table1[Color], Table1[ID], Table1[Parent ID] )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@huguest,

 

You may try LOOKUPVALUE Function in DAX.

Column =
LOOKUPVALUE ( Table1[Color], Table1[ID], Table1[Parent ID] )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
LivioLanzo
Solution Sage
Solution Sage

@huguest

 

check out: https://community.powerbi.com/t5/Desktop/Parent-Child-Hierarchy-Highest-Parent-using-Power-Query-not...

 


 


Did I answer your question correctly? Mark my answer as a solution!


Proud to be a Datanaut!  

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.