cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

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

 

 

  

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV
Super User IV

@Pbi07 , I have not checked data yet. But see if this blog can help

https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Differ...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

2 REPLIES 2
Super User IV
Super User IV

@Pbi07 , I have not checked data yet. But see if this blog can help

https://community.powerbi.com/t5/Community-Blog/Decoding-Direct-Query-in-Power-BI-Part-2-Date-Differ...



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Thanks @amitchandak 

 

I was looking if it is possible to achieve without the Dax. I keep seeing articles to utilize the Query engine for table joins etc. So, i was trying to do those transformations and identifying the shipped lines via the Query. Is that not achievable with out the DAX ? 

Helpful resources

Announcements
November Update

Check it Out!

Click here to read more about the November 2020 Updates!

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

secondImage

Power Platform October Community Highlights

Check out the top community contributors across all of the communities

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors