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

Aggr function? problem with total value

Hi,

I'm trying to make a pivot chart where I can present the purchasing value for the recent period, multiplied with the quota between the quantity of the current period and the quantity of the recent period. I want this calculation to be made for every item (StockCode):

Sum({$<DeliveryYearActual={$(=DeliveryYearActual-1)}>}RowTotalSEK)

*(Sum(QtyRecieved)/

Sum({$<DeliveryYearActual={$(=DeliveryYearActual-1)}>}QtyRecieved))

Now this works fine on the item (StockCode) level, however the total value presented in the chart is not correct. I suspect it's because the total value does not calculate the value "per item". I guess I have to use som aggr function, but I cannot make it work.

Anyone knows what to do in order to solve this problem?

Best Regards,

Rickard

2 Replies
justinasp
Creator
Creator

I'm not sure, but you could try:

sum(total <StockCode> ... RowTotalSEK) etc.

johnw
Champion III
Champion III


rickard wrote:I suspect it's because the total value does not calculate the value "per item".


Right, the total value does not calculate the value "per item". By default, it applies the chart expression to the entire chart. If instead you want to sum up the rows, then properties -> expressions -> total mode -> sum of rows. Or am I misunderstanding the problem?