1 Reply Latest reply on Jan 11, 2013 10:17 PM by Joshua Milligan

    How to make quarterly data to date type dimension

    Jason Back



      I have quarterly data and I want to make them a party of "Date type dimension".


      I have attached the example file and data as well.  I managed to figure out to make year data to date but I also want to include quarter data together.  I would appeciate any advice.  Thank you.



        • 1. Re: How to make quarterly data to date type dimension
          Joshua Milligan



          Here's a formula that will create a date field from the quarter.  Note that there are more efficient ways to write this using some math instead of string manipulation -- if you have a large volume of data, you'll want to consider that approach.


          Date(STR([Year]) + "-" +

            IF      [Quarter] = "Q1" THEN "01-01"

          ELSEIF  [Quarter] = "Q2" THEN "04-01"

          ELSEIF  [Quarter] = "Q3" THEN "07-01"

          ELSEIF  [Quarter] = "Q4" THEN "10-01"





          You could also simply move Year to the Dimensions shelf and then create your own hierarchy of Year --> Quarter.  You won't have all the options of the built in date dimension, but it would be simpler and more efficient if it met your needs.