Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Prior Date

I have a table with jobs records by customer and work date...I have the max work date...how do I get the prior work date?
  • v-frfei-msft's avatar
    6 years ago

    Hi Anonymous ,

     

    Does the measure meet your requirement?

    Prior Date = 
    VAR maxd =
        MAXX ( ALL ( 'Table' ), 'Table'[work day] )
    RETURN
        CALCULATE (
            MAX ( 'Table'[work day] ),
            FILTER ( 'Table', 'Table'[work day] <> maxd )
        )