Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Show previous date in data.

Hi all,    I'm hoping you could help me. I have tried every DAX formula under the sun that I can think of to get this right but I can't see to get anyway. I either get error messages or blank colum...
  • v-easonf-msft's avatar
    5 years ago

    Hi, Anonymous 

    Try to change you measure as below:

    Previous1 =
    VAR MaxDate =
        CALCULATE ( MAX ( 'Table1'[Date] ), ALL ( 'Table1'[Date] ) )
    VAR PreviousDate =
        CALCULATE ( MAX ( 'Table1'[Date] ), 'Table1'[Date] < MaxDate )
    RETURN
        IF ( ISBLANK ( PreviousDate ), MaxDate, PreviousDate )
    

     

    Best Regards,
    Community Support Team _ Eason
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.