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/

 

 

 

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Top Solution Authors