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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-cgao-msft
Community Support
Community Support

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
v-cgao-msft
Community Support
Community Support

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors