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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Eckhardt_david
Frequent Visitor

Get value from previous row

Hi!

 

I'm looking for a way to get a value from a previous row.

So in the example below Row 103 should look in Row 102 and get the value (129) from 'Cumul Backlog'.

I added the index/row because the timestamps are not continuous due to weekends and I thought it would be possible to refer to the current row -1 that way, but I am unable to retrieve the value.

How can I best approach this?

 

Thanks already for the help!

 

powerbi previous row.PNG

 

This would be the desired result:

RowPrevious RowShip Date#Orders to Ship# Orders ShippedCumul BacklogNew Measure
1031028/09/2023665577217129
1021017/09/2023785957129301
1011006/09/202374353530193
100995/09/202369285393254
2 ACCEPTED SOLUTIONS
ERD
Community Champion
Community Champion

@Eckhardt_david , you can try something like this:

prev_value = 
CALCULATE (
    MAX ( Table[Cumul_Backlog] ),
    TOPN (
        1,
        FILTER (
            ALLSELECTED ( Table ),
            Table[Row] < MAX ( Table[Row] )
        ),
        Table[Row]
    )
)

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

View solution in original post

ThxAlot
Super User
Super User

Prev Backlog.pbix

 

Row number is unnecessary in your case.

ThxAlot_0-1694724260226.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



View solution in original post

2 REPLIES 2
ThxAlot
Super User
Super User

Prev Backlog.pbix

 

Row number is unnecessary in your case.

ThxAlot_0-1694724260226.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



ERD
Community Champion
Community Champion

@Eckhardt_david , you can try something like this:

prev_value = 
CALCULATE (
    MAX ( Table[Cumul_Backlog] ),
    TOPN (
        1,
        FILTER (
            ALLSELECTED ( Table ),
            Table[Row] < MAX ( Table[Row] )
        ),
        Table[Row]
    )
)

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. Appreciate your Kudos.

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.