3 Replies Latest reply on Apr 21, 2015 9:21 PM by Christian Berg

    Preset values for Dashboard Prompt

    João Moreira

      Hello,

      I have a simple Dashboard prompt that lets users filter the results by time period:

       

      Year

      Month

      Week

      Day

       

      I want to  be able to have "preset" values for my dashboard prompt, like 'Current Week' or 'Last 4 weeks'.

      This way, the user would select 'Last 4 Weeks', and the Dashboard Prompt would automatically be populated:

       

      Year : 2015

      Month : March

      Week: 15,14,13,12

      Day: All column values

       

      Has anyone been able to achieve this?

      Thank you

      Joao Moreira

        • 1. Re: Preset values for Dashboard Prompt
          Jack Lu

          set prompt default value ,and use sql result ,like

          select cast((cast(SUBSTRING('@{P_MONTH}{2014-12}',1,4) as int)  - 2) as char(4))

          from "YY01"

          • 2. Re: Preset values for Dashboard Prompt
            João Moreira

            Thank you, but that is not what I need.

            I want to have more then one preset values for my Dashboard prompt:

             

            Current week

            Last 4 weeks

            Current month

            Current year

             

            When a user selects one of these, it will populate my dashboard prompts accordingly.

            If he selects Current week:

             

            Dashboard prompt:

            Year: 2015

            Period: 04

            Week: 10

            Day: All column values

             

            If he selects Last 4 weeks:

             

            Dashboard prompt:

            Year: 2015

            Period: 04

            Week: 10,9,8,7

            Day: All column values

             

            etc..

             

            Tks,

            • 3. Re: Preset values for Dashboard Prompt
              Christian Berg

              That combo I'd rather handle in the filters section of the analysis. Updating prompts based on prompts can end up as a hack which doesn't work in all cases, poses refresh issues for the variables involved and/or the conditonal section switching on the dashboard etc.

               

              Anyways, having the distinctly selectable level prompt columns and these pre-sets is possible and if you want to try it out I'd suggest dynamically rendered/hidden sections containing 4 dashbaord prompts with the 4 sets of pre-sets corresponding to the "Optons" you mention.