cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Amar-Agnihotri
Helper II
Helper II

How to get the Latest date of one column on the basis of Max date of another column in Power Query

Hello, 

I have the below  table -

AmarAgnihotri_0-1635335277980.png

I want to create a column for latest Close date on the basis of Max snapshot_date column and then i want to pick up the Incremental ACV for that latest date .. expected Result  - 

 

AmarAgnihotri_1-1635335572754.png

 

Ths issue is that i can easily find the max snapshot date using group by but how can i get the Latest Close date highlighted in the blue color for that max snapshot date . I can't use max function because it will return 30-Jun-21 but this is not the Latest close date . The latest close date is 8th-Jun-21. Once it will get done then i can easily pick up the Incremental ACV value for that latest close date.

I want it in a power query using M code or by any other way. 

 

Thanks .

 

@mahoneypat  @v-kelly-msft  @BA_Pete  @v-robertq-msft  @amitchandak 

 

1 ACCEPTED SOLUTION
Amar-Agnihotri
Helper II
Helper II

Finally, I got this resolved myself. First we have to create a table using group by then after create a custom column using Table.Max function . See the snaps below - 

AmarAgnihotri_0-1635344279499.png

 

AmarAgnihotri_1-1635344382534.png

 

For more detail visit this link--

 

https://gorilla.bi/power-query/using-table-max/

 

 

 

View solution in original post

1 REPLY 1
Amar-Agnihotri
Helper II
Helper II

Finally, I got this resolved myself. First we have to create a table using group by then after create a custom column using Table.Max function . See the snaps below - 

AmarAgnihotri_0-1635344279499.png

 

AmarAgnihotri_1-1635344382534.png

 

For more detail visit this link--

 

https://gorilla.bi/power-query/using-table-max/

 

 

 

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors