Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Limit totals in a chart by a variable

Hi,

I have a chart that displays a list of my top customers. This is adjusted by a slider that has a variable vTopN. It all works fine except the actual total is a sum of all customers and not what I set my slider to i.e. I set the slider to 5 - it shows me only 5 customers and there sales but the total is still the total of all customers. I have searched the site for a answer but do not know enough about codeing to work it out myself. I have tried certain sugestions i have seen in the forums like set the expression total to Sum of rows, but my total still remained of all customers.

My current expression is:

sum({$<Transaction={'Bills'}, Ledger={'Actuals'}, Year={$(=Max(Year))}, Quarter=, Month=, Week=, Day=, Date=>}[Billed Net Value])



Please help...





13 Replies
Not applicable
Author

Hi,

do you want to configure dinamic static step?

Just create a input box, and define in your slider the variable on field "static step"

Ex.: =$(vStaticStep)

Not applicable
Author

Hi Eduardo

Not sure if I understand your answer as if you see the original attached sample doc I uploaded I have already created a slider with a 'static step' and my chart does reduce and increase correctly when the slider is adjusted. My issue is that no matter what I have tried, the total of the chart does not reduce or increase when the slider is adjusted.

This first image is correct

This second image is incorrect. When customers is reduced to 5, the total still shows 356,820. I need the total to only show the total of the 5 customers. Should be 342870

Not applicable
Author

Hi Steve,

Here you are two possible solutions.

See attached. (there are two tables with the solution)

I hope it helps you.

Regards.

Not applicable
Author

Dear Miguel

Thank you very much. This is exactly what I needed. Big Smile

Regards Steve