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: 
pascal_theurot
Partner - Creator II
Partner - Creator II

unit price aggregation calculation

I’m stuck on an aggregation calculation.

I’ve to calculate a price variation value by day and display it by month (in sheets, graphics…).

In the following table, the last column is correct and display the good result in the circle.

It works as I’ve used the following formula in the accumulated selection column:

rangesum(above(total sum(variation), 0, rowno(Total)))

07-05-2014 07-57-02.jpg

How could I get the same result if I remove the DATE dimension or if I want it in a text box ?

Incorrect value in the yellow outlined column after DATE dimension removing (as the calculation should be based on dates):

07-05-2014 08-07-06.jpg

I’ve tried some calculations in text boxes but I can’t get the correct result. ie:

=sum(AGGR(sum(aggr(sum({<DATE={"<=$(=max(DATE))"}>}variation),DATE))*qty,DATE))

If someone has a good idea… it would be nice

Find the qvw attached

Thanks

Pascal
1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try this in your text box expression:

=sum(aggr( sum(qty)*rangesum(above(variation,0,rowno())) ,DATE))

View solution in original post

2 Replies
swuehl
MVP
MVP

Try this in your text box expression:

=sum(aggr( sum(qty)*rangesum(above(variation,0,rowno())) ,DATE))

pascal_theurot
Partner - Creator II
Partner - Creator II
Author

I didn't know you could that kind of expression in a text box (or elsewhere)

It works perfectly

thanks !!

Pascal