3 Replies Latest reply on Mar 1, 2016 5:43 AM by Paul Sherras

    Parameter control date as Day/Week/Month

    Manish Virmani


      Hi All,

       

      I am using date as Discrete value, and created a paramter to control the aggreation value based the parameter selection.

       

      Like if the value in the Parameter is selected Week, output should show the sum of Week of that particular Week.

       

      So at a time one Week value will be shown.

       

       

      Regards,

      Manish

        • 1. Re: Parameter control date as Day/Week/Month
          Paul Sherras

          Hi Manish,

           

          I think I will be able to solve this, can you just help me by clarifying what you mean by "Like if the value in the Parameter is selected Week, output should show the sum of Week of that particular Week."

           

          Is that particular week going to be another user selection? Or is it the current week/previous week?

           

          Kind regards,

           

          Paul

          • 2. Re: Parameter control date as Day/Week/Month
            Manish Virmani

            Hi Paul,

             

            Particular week: What ever user select , I forgot to include that calender in the sample file. Please see attached.

             

            For example:

            In the Time Selector user have selected Week

            User selects 24 Jan from the calender (here dropdown) than only for 24 Jan week aggreated value would be shown.

             

            In the Time Selector user selected Day

            User selects 24 Jan from the calender (here dropdown) than only for 24 Jan day value would be shown.

             

            Regards,

            Manish

            • 3. Re: Parameter control date as Day/Week/Month
              Paul Sherras

              Hi again Manish,

               

              Create a calculated field with the following:

               

              IF [Time Selector] ='Day' AND DATETRUNC('day', [Date]) = DATETRUNC('day', [Date Parameter]) THEN 'Show'

              ELSEif  [Time Selector] ='Week' AND DATETRUNC('week', [Date]) = DATETRUNC('week', [Date Parameter]) THEN 'Show'

              ELSEif  [Time Selector] ='Month' AND DATETRUNC('month', [Date]) = DATETRUNC('month', [Date Parameter]) THEN 'Show'

              END

               

              Put this on your filters and set the filter to include "Show".

               

              I hope this gives you desired result, I tested it and it seems to work.

               

              Kind regards,

               

              Paul