2 Replies Latest reply on Jun 23, 2013 2:01 AM by Antonio Willybiro

    quarterly date format

    Antonio Willybiro

      Hi -

       

      I have data with quarterly data formatted like this

      Q1.2010

      Q2.2010

      ...

      Q1.2013

       

      how can I get Tableau to recognise those as quarters?

       

       

      Thanks

      Antonio

        • 1. Re: quarterly date format
          Shawn Wallwork

          There might be a more elegant solution, but this one works. In any case you're going to pay a performance price for doing string manipulations in Tableau to get a date. If your dataset is small (<500K) you probably won't notice. If it's bigger you'll definitely want to convert these pre-Tableau. Anyway here's the formula:

           

          IF INT(MID([Quarters],2,1 ))=1 THEN DATE("1/1/" + RIGHT([Quarters],4))
          ELSEIF
          INT(MID([Quarters],2,1 ))=2 THEN DATE("4/1/" + RIGHT([Quarters],4))
          ELSEIF
          INT(MID([Quarters],2,1 ))=3 THEN DATE("7/1/" + RIGHT([Quarters],4))
          ELSEIF
          INT(MID([Quarters],2,1 ))=4 THEN DATE("10/1/" + RIGHT([Quarters],4))
          END
          
          

           

          (See attached.)

          Hope this helps.

           

          --Shawn

          1 of 1 people found this helpful
          • 2. Re: quarterly date format
            Antonio Willybiro

            Thank you Shawn