Forum Discussion

dacosta's avatar
dacosta
Regular Visitor
5 years ago
Solved

Reference Another Row for Future Assignment

Hello I need help in creating a column that references another row and populates a future assignment. We assign employees to projects and each assignment comes into the report as a single row. Some e...
  • v-cazheng-msft's avatar
    v-cazheng-msft
    5 years ago

    Hi, dacosta 

    You can create the following Calculated columns to get the result you want.

     

    Column 1

    Rank by Person name =

    RANKX (

        FILTER ( ALL ( Assignments ), [person_name] = EARLIER ( [person_name] ) ),

        [Assignment Start Day],

        ,

        ASC,

        DENSE

    )

     

    Column 2

    Future Assignment Name =

    CALCULATE (

        MAX ( 'Assignments'[Assignment Name] ),

        FILTER (

            ALL ( Assignments ),

            [Rank by Person name]

                = EARLIER ( [Rank by Person name] ) + 1

                && [person_name] = EARLIER ( [person_name] )

        )

    )

     

    Column 3

    CALCULATE (

        MAX ( 'Assignments'[Assignment Start Day] ),

        FILTER (

            ALL ( Assignments ),

            [Rank by Person name]

                = EARLIER ( [Rank by Person name] ) + 1

                && [person_name] = EARLIER ( [person_name] )

        )

    )

     

    The result looks like this:

     

    Here is the sample.

     

    Best Regards,

    Caiyun Zheng

     

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