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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors