Forum Discussion

_Kelz0484's avatar
_Kelz0484
Frequent Visitor
1 year ago
Solved

Latest date with a clause

Hi, Bit of an odd one! I have a dataset which includes 2 x date columns, 'test date' and 'concessed date' I would like to create a new column called 'master date' which looks at the other 2 columns ...
  • mark_endicott's avatar
    mark_endicott
    1 year ago

    _Kelz0484 

     

    SWITCH (
        TRUE (),
        ISBLANK ( 'Table'[Concessed Date] ) && ISBLANK ( 'Table'[Test Date] ), TODAY(),
        ISBLANK ( 'Table'[Concessed Date] ), 'Table'[Test Date],
        ISBLANK ( 'Table'[Test Date] ), 'Table'[Concessed Date],
        'Table'[Concessed Date] < 'Table'[Test Date], 'Table'[Concessed Date],
        MAX ( 'Table'[Test Date], 'Table'[Concessed Date] )
    )

     

    If this now works, please accept as the solution for others with the same challenge.