Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
lsdrolias
Contributor II
Contributor II

Calculate sum for previous dimension value

Hi,

I have a pivot table where I sum a numeric field by a date field:

dimension field: pdate

expression: sum(stockqty)

I now want to add another expression to sum stockqty for the previous date. How can I do that with set analysis?

Thanks for your help

8 Replies
Gysbert_Wassenaar

You can't with set analysis. The set is calculated per chart, not per row. Try above(sum(stockqty))


talk is cheap, supply exceeds demand
swuehl
MVP
MVP

You should look into the chart inter record functions, namely above() or before() [depending on your table layout]:

=above(sum(stockqty))

or

=before(sum(stockqty))

lsdrolias
Contributor II
Contributor II
Author

Thanks for the reply. Unfortunately, above(sum(stockqty)) does not produce any value

lsdrolias
Contributor II
Contributor II
Author

Thanks for the reply. Unfortunately, above(sum(stockqty)) does not produce any value

lsdrolias
Contributor II
Contributor II
Author

Thanks for the reply. Unfortunately, teh expression above(sum(stockqty)) does not produce any value

lsdrolias
Contributor II
Contributor II
Author

Thanks for the reply. Unfortunately, the expression above(sum(stockqty)) does not produce any value

lsdrolias
Contributor II
Contributor II
Author

Thanks for the reply. Unfortunately, the expression above(sum(stockqty)) does not produce any value

lsdrolias
Contributor II
Contributor II
Author

Sorry for the multiple replies. Yes, the above function solved my problem. Thanks.