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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
triby25
New Member

Lookup Maximium Value In Another table for each record

Hi,

 

I have two tables in Power Query Editor (Header and Details), i need to add a new column in header table thats connains the maximium asociated value in the Detail table. 

triby25_0-1670531567184.png  

triby25_1-1670531639956.png

 

Result that i want

triby25_2-1670531719194.png

 

How can i do this using Power Query ?

Thanks!

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @triby25 ,

You may consider using the following steps.

1. Duplicate the DETAILS TABLE.

vcgaomsft_0-1670564359493.png

2. For DETAILS TABLE(2), Group by [IDD].

vcgaomsft_1-1670564454899.png

vcgaomsft_2-1670564511230.png

3. Select HEADER TABLE and Merge Queries.

vcgaomsft_3-1670564589270.png

Select [ID] and [IDD]

vcgaomsft_4-1670564653871.png

4. Expand [MAX_VALUE]

vcgaomsft_5-1670564720924.png

Result.

vcgaomsft_6-1670564749960.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @triby25 ,

You may consider using the following steps.

1. Duplicate the DETAILS TABLE.

vcgaomsft_0-1670564359493.png

2. For DETAILS TABLE(2), Group by [IDD].

vcgaomsft_1-1670564454899.png

vcgaomsft_2-1670564511230.png

3. Select HEADER TABLE and Merge Queries.

vcgaomsft_3-1670564589270.png

Select [ID] and [IDD]

vcgaomsft_4-1670564653871.png

4. Expand [MAX_VALUE]

vcgaomsft_5-1670564720924.png

Result.

vcgaomsft_6-1670564749960.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

HotChilli
Community Champion
Community Champion

You can duplicate the Details table and do a Group By on ID with Max of Value

then Merge that table with Header table

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.