Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Date column less than another date column

Hello, 

 

I have 2 date columns and I want to figure out if date column A is less than date column B then show me date column A. 

 

Also 

 

If date column B is blank show me date column A. 

 

Thank You 

 

 

  • Anonymous's avatar
    Anonymous
    6 years ago

    Anonymous 

    Or If you want a measure: 

     

    Measure = IF(MAX([Date1])<MAX([Date2])||ISBLANK(MAX([Date2])),MAX([Date1]),BLANK())

     

    Best regards
    Paul Zheng

     

7 Replies

  • az38's avatar
    az38
    Icon for Community Champion rankCommunity Champion

    Hi Anonymous 

    try a column

    Column = 
    IF([column A]<[column B] || ISBLANK([column B]), [column A], "Other")

    replace "Other" to a value you need for case B>A

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello az38 , 

       

      I tried to use the column but i get the below error? Please help 🙂 

       

       

      • az38's avatar
        az38
        Icon for Community Champion rankCommunity Champion

        Anonymous 

        try

        Column 3 = IF([NotifiedOfConnectionDate]<[LegalsCompleteDate] || ISBLANK([LegalsCompleteDate]),
        [NotifiedOfConnectionDate],
        BLANK()
        )

        you use boolean statement iSBLANK() in place where should be Date type value 

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous 

    Or If you want a measure: 

     

    Measure = IF(MAX([Date1])<MAX([Date2])||ISBLANK(MAX([Date2])),MAX([Date1]),BLANK())

     

    Best regards
    Paul Zheng

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello, 

       

      I used your formula however it now doesn't work? as for some reason it is showing me 31/12/2020 which is in neither column as shown below. 

       

      "If 'Notified of Connection Date' is less than 'LegalsCompleteDate' then show 'Notified of Connection Date'

                                                                       
                                                                          AND     

       

      "If 'Legals Complete Date' is blank show 'Notified of Connection Date'                       

       

      Formula

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        Anonymous 

        Try remove ".Date " after each date columns.

         

        Best regards
        Paul Zheng