2 Replies Latest reply on Oct 12, 2019 12:47 PM by Mohsin Masrur

    How to Compare same days incident

    Mohsin Masrur

      Hi, I'm a newbie in Tableau and struggling to write a Date function for one of my project. Can anyone help me please?

       

      Create a worksheet a visualization that summarizes

      a.total number of crimes that are reported [RPT_DT] on the same day as they occur [CMPLNT_FR_DT],

      b.total number of crimes that are reported on the day crime has ended [CMPLNT_TO_TM]

      c.total number of crimes that are reported within 10 days of ending

       

      This is what I wrote, but it doesn't work.

       

      case([CrimeVsReportDate10-20])

      WHEN "Same Day" then ([Rpt Dt]=[Cmplnt Fr Dt])

      WHEN "Same Day Ended" then ([Rpt Dt]=[Cmplnt To Tm])

      END

       

      Thank you.