Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

DAX Last Entry value

Hi, I have below data, I need to return the Name of the last Entry No per JobID and exclude some status.   I have below measure that return the name of the last entry for most jobid but return...
  • Jihwan_Kim's avatar
    3 years ago

    Hi,

    I am not sure how your datamodel looks like, but please try something like below whether it suits your requirement.

     

    New Measure =
    VAR _maxentryno =
        MAXX (
            FILTER (
                Tow,
                NOT ( Tow[Status] IN { 0, 11, 12 } )
                    && Tow[JobID] = MAX ( Tow[JobID] )
            ),
            Tow[Entry No]
        )
    RETURN
        MAXX (
            FILTER ( Tow, Tow[JobID] = MAX ( Tow[JobID] ) && Tow[Entry No] = _maxentryno ),
            Tow[To Name]
        )