Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to connect two sliders

Hi all QV developers, would I ask you for help?

Is possible to make solution where are two interrelated sliders responding to each other? Picture is below.

Default state:

- upper slider shows %

- left slider shows whole numbers (integers)

- straight table contains products and their sales. Table is always sorted by sales size descending

Requirement:

1a)

When "x"% is selected in the upper slider then table show products whose sales are "x"% of total sales. - This works for me

1b)

Showing this "x"% in NUMBERS on the left slider - how many products makes this "x"%

This solution must work also in reverse.

THANKS YOU MUCH for any idea!

Mirek

1 Solution

Accepted Solutions
whiteline
Master II
Master II

Hi.

Open Triggers page in Document Properties.

Take attention to the bottom, variable event triggers listbox.

For  vFirstX variable add OnChange action.

Again click Add. Select External->SetVariable.

Input in Variable and Value correspondingly:

vTopN

=floor(Count(Author)*vFirstX)

Then for vTopN variable add OnChange action.

Again click Add. Select External->SetVariable.

Input in Variable and Value correspondingly:

vFirstX

=vTopN/Count(Author)

Now your variables is strongly conncected.

You should also play with min/max/step values in your sliders to get it work properly.

You could also add/change floor() function with slider step as base parameter.

View solution in original post

4 Replies
IAMDV
Luminary Alumni
Luminary Alumni

Hi Mirek,

Please can you post the sample app and we can workout a solution for you.

Thanks,

DV

www.QlikShare.com

Not applicable
Author

Hello Deepak,

I've created sample app. I hope that the descriptions in text objects will be understandable.

Thanks for your any help!

Mirek

whiteline
Master II
Master II

Hi.

Open Triggers page in Document Properties.

Take attention to the bottom, variable event triggers listbox.

For  vFirstX variable add OnChange action.

Again click Add. Select External->SetVariable.

Input in Variable and Value correspondingly:

vTopN

=floor(Count(Author)*vFirstX)

Then for vTopN variable add OnChange action.

Again click Add. Select External->SetVariable.

Input in Variable and Value correspondingly:

vFirstX

=vTopN/Count(Author)

Now your variables is strongly conncected.

You should also play with min/max/step values in your sliders to get it work properly.

You could also add/change floor() function with slider step as base parameter.

Not applicable
Author

Perfect, that's proper way how to connect sliders, thank you! I did not know that variables can have triggers.. wow 🙂

I will try to handle it, Thank You!