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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to SUM in script.

Hi,

Now I make sum in chart expression. But it is slow. So I want to sum in script by 'group by' clouse like:

load

sum(amount) as aamount

resident table

group by year,month, product;

In my layout, I have 3 list box of  'year,month, product' and a chart. I can get the same result in chart when I select EACH list box where ever I make sum, but different deselect any list box.

Default, in qlikview chart summary the result is same when 'select nothing and select all'------------------select nothing = select all

But if I do summay in script 'select nothing <> select all'  .

My question is how can I make 'select nothing = select all' in script summary?

1 Reply
swuehl
MVP
MVP

Not sure if I completely understood, but if you used

load

sum(amount) as aamount

resident table

group by year,month, product;

I believe you will get a data island table with just field aamount, not linked with any other fields. So no selection will affect any aggregation on field aamount. I would suggest linking above table to your other tables e.g. by a surrogate key, a simple one would be

load

sum(amount) as aamount,

year & month & product as Key

resident table

group by year,month, product;

(and you need to add the Key also to your table you want to be linked, I assume table 'table'.

Hope this helps,

Stefan