Skip to main content
Announcements
Get Ready. A New Qlik Learning Experience is Coming February 17! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tmumaw
Specialist II
Specialist II

Top xxx based on Slider

I have created a slider with values 1 - 500. Then I have a customer list by customer/address, sales $. My user wants to be able to see the number he selected from the slider as a count be side each customer. Something like this. The row count has to be based on the slider. Thanks

1 customer 1 address sales $

2 customer2 address sales $

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi Thom,

It's working fine for me. Anyway, check the attached example.

Hope that helps.

View solution in original post

14 Replies
Not applicable

Hi,
Presuming you have a variable attached to the slider in the 1st place; can you not simply add the variable as an expression in the Customer table?
I've just done something similar to a slider in an app I'm working on and it seems to have done the trick; always assuming, of course, that I have interpreted your request correctly!

Regards,
Jon

tmumaw
Specialist II
Specialist II
Author

Yes I do have a variable attached to the slider. How would the variable work? For example the user selects 200 from the slider, what would the expression have to look like?

thanks

thom

Not applicable

Hi,
As stated earlier, this is my interpretation of your request!!
Anyway, in my example below the expression = the variable ie my variable is 'vBrowser_Rate':

Apologies in advance if I've misinterpreted your request,
Have a good weekend!

Jon

tmumaw
Specialist II
Specialist II
Author

You are displaying the value of your slider, what I want to do is display a row count based on the number on my slider. Say I selected 100 on my slider. I want to see the top 100 customers, and I want customer 1, 2 ,3, etc all the way to 100.

Thom

Miguel_Angel_Baeyens

Hello Thom,

1.- Create a variable called vHowMany,

2.- Create e slider object using this variable, and set its minimum value to 1 and the maximum to

=Count(DISTINCT DID)


DID Is my company code here.

3.- Use the following as dimension in the chart:

=If(aggr(rank(aggr(sum(SalesAmount), DID), 4, 2), DID) <= $(vHowMany), DID, 'Others')


The "Others" in the else statement may help or may not, you can remove it and check "Suppress when values is Null" for this new calculated dimension. I have some examples there if you'd like to see (just this calculated dimension).

I'm using in the example

Sum(SalesAmount)


Just to check that the above is correct.

Hope this helps.

tmumaw
Specialist II
Specialist II
Author

Hi Miguel,

All I see in the calculated column is "Other", what I want to see is how they rank 1,2,3 etc.

Thanks
Thom

Not applicable

Hi Miguel

Thanks for this smart example. It works perfect. I will use right now.

JJ

Miguel_Angel_Baeyens

Hi Thom,

It's working fine for me. Anyway, check the attached example.

Hope that helps.

Miguel_Angel_Baeyens

Many thanks Jean-Jacques. Use the file posted above if that helps you.

Regards.