New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Contributor II

Slider not working in Qlik Sense

Hi,

I have a requirement where I need to use a Slider. The Slider I used is the one published in the Qlik Branch called "Sense Range Slider".

The requirement is that the Slider is supposed to have the minimum salary and the maximum salary as its ranges. And when the user moves the slider either left or right and changes the ranges, the table below it (with the columns Employees and salary) should display ONLY those Employees that have salary in the range selected. Dimension being Employee and expression is sum(salary).

For example, if we change the slider range between 50,000  to 10,000, ONLY those Employees with that salary range should come in the table below. I hard coded one of the ranges to see if that made any difference and it did.

1. In the table, I selected the dimension Employee.

2. From the Limitation, selected "Exact Value" and changed it to >=50000.

3. Wen I apply the changes, I saw that the table has been filtered to ONLY those employees with salaries in more than 50000.

Now all I want is to limit it by the selections that the user makes in the slider.

Thanks.

Regards,

Deepti Singh

Tags (2)
1 Solution

Accepted Solutions
Contributor II

Re: Slider not working in Qlik Sense

Hi Andy,

I found a way to get the slider working.

1. First I defined the minimum and maximum salary in the script as vLower and vUpper respectively.

2. Then I defined the ranges in the slider

(In the "Variable for Lower Values", I wrote vLower and in the "Variable  for Upper Value" vUpper) and in the "Lower Value" the minimum salary and "Upper Value" the maximum salary.

3. Then I created a table with dimension Employee and in the measure I wrote the following set analysis

if (sum(salary)>= vLower and sum(salary)<= vUpper, sum(salary))

4. Now when I move the Slider to define different salary ranges, I can see that the table limits the employees with that salary range.

4 Replies
Honored Contributor II

Re: Slider not working in Qlik Sense

‌You should be storing the values set in your slider in 2 separate variables for use in your charts.

As an intermediary step to troubleshoot your issue

1. SET vMInSalary=10000

2. SET vMaxSalary=50000

IF your table displays corrEctly then move on to wiring your variable into your slider extension and testing the value changing in the front end.  If that extension is not working another one you can use is called qsvaraible

Hope this helps you investigate your issue further

Regards

Andy

Contributor II

Re: Slider not working in Qlik Sense

Hi Andy,

I found a way to get the slider working.

1. First I defined the minimum and maximum salary in the script as vLower and vUpper respectively.

2. Then I defined the ranges in the slider

(In the "Variable for Lower Values", I wrote vLower and in the "Variable  for Upper Value" vUpper) and in the "Lower Value" the minimum salary and "Upper Value" the maximum salary.

3. Then I created a table with dimension Employee and in the measure I wrote the following set analysis

if (sum(salary)>= vLower and sum(salary)<= vUpper, sum(salary))

4. Now when I move the Slider to define different salary ranges, I can see that the table limits the employees with that salary range.

Honored Contributor II