Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

How to 'input' a required selection ?

Hi,

In my dashboard, at the script side, I am calculating a calender table with columns like Year, Quarter and Month

The customer requirement at UI now changed and they want a filter of the following sort,

..that is, they want in a multibox, with two dropdowns. 1)Period 2)Range

In period dropdown, they want to see the values Year, Quarter and Month

In range dropdown, they want to see the values from 1-10

Now on selecting say Year in the Period dropdown and on selecting say 5 from the Range dropdown, they want the dashboad selection to be set for last five years.

I have no idea how to implement this without altering the current way the data is structured at the script side.

If anyone can guide me with suggestions/ideas..that would be of great help.

Thanks,

Vishnu

2 Replies
Not applicable

Re: How to 'input' a required selection ?

vishnu,

why not use the range as a parameter that will act somthing like a 'top n' values?

in dimension limits, you select top n limitation and put there a parameter

then, you create a slider or a drop down list with only number and when selecting a number it will be put into the parameter allowing to calculate the top n years in your case....

tanelry
Contributor II

Re: How to 'input' a required selection ?

It is easy to implement with variables.

Instead of multibox add input box with two new variables to select Period and Range (use "predefined values in drop-down" as constrain).

Then create a variable vRangeStart to store required starting date of dashboard data.

For this variable add expression to recalculate the date every time user changes Period or Range.

Something like this:

=date(

  if(vPeriod = 'Year', makedate(year(today())-vRange),

  if(vPeriod = 'Month', addmonths(monthstart(today()), -vRange),

  if(vPeriod = 'Quarter', addmonths(quarterstart(today()), -vRange * 3))))

  )

In dashboard expressions add if-statement or set-analysis syntax to always limit the data to

Date >=vRangeStart.

Community Browser