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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
WTAS80486
Helper IV
Helper IV

To group a table based on previous date and its value previous date (one before max date)

Hi,

 

I need to group a table based on previous date and its value

 

WTAS80486_1-1681340530797.png

 

Or i already grouped it based on max date, can i get previous date and value corresponding to max date for each number?

 

Thanks

 

 

 

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

NewStep=Table.FromRecords(Table.Group(PreviousStepName,"Number",{"n",each Table.Skip(Table.Sort(_,{"date",1})){0}? ??_{0}})[n])

View solution in original post

2 REPLIES 2
WTAS80486
Helper IV
Helper IV

@wdx223_Daniel Thanks so much!

wdx223_Daniel
Super User
Super User

NewStep=Table.FromRecords(Table.Group(PreviousStepName,"Number",{"n",each Table.Skip(Table.Sort(_,{"date",1})){0}? ??_{0}})[n])

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.