Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Qlikview, how to create an expression which does not change with listbox selection?

Example, I have table below..

Week, Quantity
1, 10
1, 15
1, 10
2, 20
2, 30
3, 10
3, 50

I also have a list box for 'Week' which is current selected on week 2.

Now, I want to create text object which shows the value of sum of quantity of week 1 (ie. 35), which will always show that result even when the list box is selected on week 2. How can I achieve this?

Currently I managed to do an expression which sums week 1 but as soon as I select week 2 it shows 0 ....

like image 358
tastefullvenom Avatar asked Jan 26 '26 19:01

tastefullvenom


2 Answers

Enter the following to your textfield:

= 'Sum week 1 : ' & sum({$<Week={'1'}>}Quantity)

Use the '&' to concat values. And use the set analysis (Page 799 of the QlikView Reference Manual) to select the reqired values.

sum({$<Week={'1'}>}Quantity)

Read this like: Sum the values of 'Quantity' Where 'Week' is 1.

like image 142
smartmeta Avatar answered Jan 28 '26 18:01

smartmeta


Replace the '$' with '1' and the expression will ignore current selection e.g.

sum({1<Week={'1'}>}Quantity)
like image 45
Gan CW Avatar answered Jan 28 '26 16:01

Gan CW



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!