Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Power Query Merge rows and get latest date

Have a basic question on how power query can do merge rows and pick laest date . 

 

I have a table with order details  and another with the shipments against each order. Need to show in the visual that for each order the shipments are complete and show the last shipment date of the order and show the average days to ship for a selected date range.  Order -> Shipment table have a 1 to many relation. 

I was trying to do a simple grouping, but how to pick the latest date if their are multiple shipments 

Customer   Order#     Days to ship     

100             8000000     9

101             8000001     20 

 

Sample model is attached. This is a direct query model. IS it better to do grouping and then do a lookup for the latest date for the Order #? 

 

https://drive.google.com/file/d/1R-n3GB2KRw7k970OxICrph8cLTneFtNo/view?usp=sharing

 

 

  

 

 

 

2 Replies