Forum Discussion

Eckhardt_david's avatar
Eckhardt_david
Frequent Visitor
3 years ago
Solved

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 ...
  • ERD's avatar
    3 years ago

    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]
        )
    )