Forum Discussion

spocx's avatar
spocx
Helper I
8 years ago
Solved

Finding first value with same ID in multiple rows based on date/time

Dear Power BI community   I need help to write a DAX formular that can identify the first value in multiple rows with the same ID based on date/time. I have a table as shown below and need to calcu...
  • v-yulgu-msft's avatar
    8 years ago

    Hi spocx,

     

    First Assign team =
    VAR firstassigndate =
        CALCULATE (
            MIN ( 'table 1'[Assign date/time] ),
            ALLEXCEPT ( 'table 1', 'table 1'[Ticket ID] )
        )
    RETURN
        CALCULATE (
            SELECTEDVALUE ( 'table 1'[Team assigned] ),
            FILTER (
                ALLEXCEPT ( 'table 1', 'table 1'[Ticket ID] ),
                'table 1'[Assign date/time] = firstassigndate
            )
        )
    

     

    Best regards,

    Yuliana Gu