4 Replies Latest reply on Mar 30, 2016 7:29 AM by Michael Franz

    Dynamically Changing Views (year vs qtr vs month)

    Michael Franz

      I am looking to do counting of customers over time and I am trying to create a dynamic CALCULATED field that will help with the solution.

       

      I created a parameter called "Frequency" that has the following choices:

      Value / Display - data type = string

      Day -

      Month -

      Quarter -

      Year -

       

      I created a parameter called "Date”:

      Data Type = Date and values are set to "ALL"

       

      Now I want to create a calculated field called BOOK DATE based on the 2 parameters “Frequency” and “Date”

      I select "Frequency" and "Date" parameter is 2016-03-01 the results would present based on the choices:

       

      Day – In the Book Date field, the answer would be 2016-03-01 or NULL

      Month – In the Book Date field, the answer would be 2016-03-01 (going back 15 months) to 2016-02-01, 2016-01-01,etc……..or NULL

      Quarter - In the Book Date field, the answer would be 2016-03-01  (6 quarters).. so 2016-03-01, 2016-01-01, etc.....or NULL

      Year - In the Book Date field, the answer would be 2016-03-01 (5 years) so 2015-03-01, 2014-03-01, etc..... OR NULL

       

      I will not be displaying the NULLS because they will be out of the necessary analysis.

       

      I have attached a file where I have completed the syntax for DAY, but no clue on how to do Month, Quarter, and Year....