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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. 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
Super User
Super User

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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.