Forum Discussion

adieball's avatar
adieball
Helper I
8 years ago
Solved

Latest Date based on multiple columns

Hi

 

I have a source that has multiple date columns.

I need to find the latest date over all e.g. three columns.

 

How can I do this? any help is appreciated thanks

  • adieball

     

    Also using the Query Editor's User Interface,,, you can add a column for latest date

    Select all the Date Columns and select Latest date as shown in image below

     

3 Replies

  • v-danhe-msft's avatar
    v-danhe-msft
    Microsoft Employee

    Hi adieball,

    Based on my test, you could refer to below steps:

    Add a customer column in query editor:

    =List.Max({[Column2], [Date1], [Column1]})

    Apply it and create a measure:

    myMax = MAX('Table1'[Latest])

    Now you could see the correct result.

     

    Regards,

    Daniel He

    • Zubair_Muhammad's avatar
      Zubair_Muhammad
      Community Champion

      adieball

       

      Also using the Query Editor's User Interface,,, you can add a column for latest date

      Select all the Date Columns and select Latest date as shown in image below

       

  • jthomson's avatar
    jthomson
    Solution Sage

    Make a measure to find the latest in each of the columns individually. Then make a measure that pulls the individual measure results in as variables, having a result of the latest of the three variables.