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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

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 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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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