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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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