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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors