9 Replies Latest reply on Jun 25, 2017 11:13 PM by Paul.Labuda

    Date format

    Paul.Labuda

      Hi,

      I want the axis to show hours, days, weeks, and months, depending on the selected parameter.

      Look like this

       

      Hour

      2017-06-23 09_52_18-Zdjęcia.png

       

      Day

      2017-06-23 09_44_02-Zdjęcia.png

       

      Week

      2017-06-23 09_47_10-Tableau - Yield.png

      Month

      2017-06-23 09_49_03-Zdjęcia.png

       

      My calculated field look like this

      IF [INTERVAL] = "Hourly" THEN DATETRUNC('hour', [Test Insert Date]) + DATEPART('hour', DATETRUNC('hour', [Test Insert Date]))
      ELSEIF [INTERVAL] = "Daily" THEN DATETRUNC('day', [Test Insert Date]) + DATEPART('day', DATETRUNC('day', [Test Insert Date]))
      ELSEIF [INTERVAL] = "Weekly" THEN DATETRUNC('week', [Test Insert Date]) + DATEPART('week', DATETRUNC('week', [Test Insert Date]))
      ELSEIF [INTERVAL] = "Monthly" THEN DATETRUNC('month', [Test Insert Date]) + DATEPART('month', DATETRUNC('month', [Test Insert Date]))
      END
      

      but this isn't good look.

      2017-06-23 09_57_17-Tableau - Yield.png

      2017-06-23 09_57_48-Zdjęcia.png

      2017-06-23 09_58_32-Zdjęcia.png

      2017-06-23 10_01_40-Tableau - Yield.png

       

      Any ideas?