Forum Discussion

lawena's avatar
lawena
Regular Visitor
2 years ago
Solved

Calculated column with a value from a previous row

I want to create a column that holds the value of the ID for a Feature's "parent" Objective My table looks like this, all subsequent Features under the Objective are children of the Objective: ...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi,

    Thanks for the solution bhanu_gautam offered and i want to offer some more information for user to refer to.

    hello lawena , you can try the following calculated column.

    Column =
    VAR _filterindex =
        MAXX (
            FILTER (
                'ClosedFeaturesByObjective',
                [Work Item type] = "Objective"
                    && [Index] <= EARLIER ( 'ClosedFeaturesByObjective'[Index] )
            ),
            [Index]
        )
    VAR _id =
        LOOKUPVALUE ( 'ClosedFeaturesByObjective'[ID], [Index], _filterindex )
    RETURN
        IF ( [Work Item type] = "Feature", _id )
    

    Output

     

    Best Regards!

    Yolo Zhu

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