1 Reply Latest reply on Oct 26, 2018 2:46 AM by Rahul Kohli

    How to embed half hourly filter with other date aggregation filters

    Rahul Kohli

      Hi everyone,

                           I have a workbook that requires user selected date aggregation filters, for example anyone with a tableau viewer licence can view this dashboard in our tableau server online and aggregate date on either of these bases : -

      • yearly
      • quarterly
      • monthly
      • weekly
      • weekday
      • daily
      • hourly
      • and half hourly basis

      I have been able to get all of it done using parameters and calculated fields, but unable to embed "half hourly filter" , can anyone show me a workaround on how to get it done. I know how to embed half hourly intervals in a stand alone filter but i need to embed it withing "zdateaggrigation" field along with all other options. ( its giving incompatibility error in case statement)

       

       

      Also, though its secondary and not urgent, I would need to display more user friendly axis labels, for example right now when i choose date aggregation to "monthly" i get x axis displaying 1, 2,3....12 where 1 represents January and 2 February and so on, i would like to display month names instead.

      P.S. all the calculated fields start with a "z" prefix in dimensions ( they all stack together at the bottom, that way they are easier to locate)

        • 1. Re: How to embed half hourly filter with other date aggregation filters
          Rahul Kohli

          ok i found a solution, here is what worked...

           

          CASE [Select Date Aggregation]

          WHEN "Yearly" THEN [zYeardatecreated]

          WHEN "Quarterly" THEN DATEPART('quarter',[datecreated])

          WHEN "Monthly" THEN MONTH([datecreated])

          WHEN "Weekly" THEN DATEPART('week',[datecreated])

          WHEN "Daily" THEN DAY([datecreated])

          WHEN "Hourly" THEN DATEPART('hour',[datecreated])

          WHEN "Weekday" THEN DATEPART('weekday',[datecreated])

          WHEN "Half Hourly" THEN round(((DATEPART('hour',[datecreated])*60)+DATEPART('minute',[datecreated]))/30)

          END