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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Power Query - Bring Max Value From Another Table

Hello,

 

Reaching out with a topic which beats me totally.

I have two tables:

1) Header Level Report - Contains invoice details on a header levelHeader Level.PNG

 

 

2) Invoice Status History Report - Contains all the steps through which the invoice wentInvoice History.PNG

 

 

 

 

 

 

 

 

 

 

I have as column element the invoice number.

At the end of table two I have some columns classifying the steps.Details.PNG

 

I want to achieve two things:

1) In the header level report to bring a column with the Group value which needed the most time for that specific invoice and the corresponding time.

2) Add two columns summing up separately the time spent for Posting & Hold.

 

Is something like this possible?

 

Thank you,

Cristian

 

1 REPLY 1
Nolock
Resident Rockstar
Resident Rockstar

Hi @Anonymous,

yes, both requests are possible. But I can't prepare a PowerQuery query for you if you don't provider any test data. Even I don't know what column should be used for join.

What should be done:

Request Nr. 1: Use Table.NestedJoin in PQ or Merge Queries in the UI to join the header and the detail table. It creates a new column which contains all rows of detail table for the current key. Go to PQ Editor and filter this new column to get only one row containing the max value. Expand this row into the header table and you're done.

Request Nr. 2: Again, join those two tables and sum up columns in the new nested table.

 

Btw. you can do both steps at once which will increase the performance of the solution.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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 Solution Authors