Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to set default range for slider on startup?

Dear Qlikview developers,

I'm building a dashboard where I need to give a slider a default range when the document is opened. I already now that I can use Document Event Triggers (OnOpen > Select in Field for example) I apply this technique for a listbox which holds the days in a week. But now I want to give my slider its default range. Unfortunately I don't know exactly how to accomplish this. I already searched the forum for this problem. But didn't find any topic which gives a clear-cut answer to my specific problem.

Below is a screenshot of the slider.


The slider is attached to a field named Cofely.Hour and represents the amount of hours in a day. I want to make sure that when the document is opened the range 8 - 18 is selected as default.

Added Qlikview file

2 Replies

Add two Set Variable actions to the OnOpen document trigger to set the values of the variables used in your slider to the values you want.

talk is cheap, supply exceeds demand
Not applicable

Do you mean that I need to assign 2 variables to my slider, in stead of the datafield "Cofely.Hour"?

I've added the qlikview file as attachement now.

The reason why I use Cofely.Hour for the slider is because the slider is used to narrow down the dataset, which belongs to a specific Alternate State (TW1 or TW2) Then difference scatterplots can be made according to the specific dataset (TW1 or TW2).

If I replace Cofely.Hour with 2 variables, my dataset will not be narrowed down anymore, am I right? I added my Qlikview file for clarification.

For example, In the last chart on the left you will find a bunch of expressions. The expression named GasconsumptionPerHour_Monday_Period_Hour, shows the gasconsumption on monday, where the period is determined by the slider. The expression is as follows:

Avg({<Calendar.WeekDay = {'ma'},Cofely.Hour ={">=$(=Min(Cofely.Hour)) <=$(=Max(Cofely.Hour))"}, Calendar.DayYear= >}Cofely.Gas)

If I replace Cofely.Hour in my slider-settings, the expression wont fit anymore, the line isn't drawn anymore (for the specified period) and the dataset isn't narrowed down anymroe.