Forum Discussion

CHJustesen's avatar
CHJustesen
New Member
8 years ago
Solved

Finding the previos occurrence within same table based on one criteria

Hi guys,   I have a list of time registers from users registering that they have been spending time on a customer case, as well as if they have held a break. I would like to find the user who previ...
  • v-chuncz-msft's avatar
    8 years ago

    CHJustesen,

     

    You may add a calculated column as shown below.

    Column =
    MAXX (
        TOPN (
            1,
            FILTER (
                Table1,
                Table1[Case] = EARLIER ( Table1[Case] )
                    && Table1[Entry No] < EARLIER ( Table1[Entry No] )
            ),
            Table1[Entry No], DESC
        ),
        Table1[User]
    )