Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Partner
Partner

Cumulative Sales for Products over multiple years

Hi.

I have a table that shows Year,Product, and Sales. I need to create a cumulative sales column for each product by different Years.

Screen Shot 2016-10-03 at 10.26.58 AM.png

I need to create set analysis to create the "Cumulative Sales" Column. I have included the equations for cumulative sales in the "Cumulative Sales Equation".

Thanks in advance

15 Replies

Re: Cumulative Sales for Products over multiple years

Seems like the same thing you asked here:

cummulative sales set analysis

Partner
Partner

Re: Cumulative Sales for Products over multiple years

Sunny,

This is working. But when I select a year like 2013 it seems like the logic breaks.

Any ideas?

Re: Cumulative Sales for Products over multiple years

Try this:

Aggr(RangeSum(Above(Sum({<Year, Vintage>}Revenue), 0, RowNo())), Vintage, Year)

and see if that helps

galax_allu
Valued Contributor

Re: Cumulative Sales for Products over multiple years

I agree with  sunny's reply

please try his formula like ?

Aggr(RangeSum(Above(Sum{1}(Revenue), 0, RowNo())), Vintage, Year)

Partner
Partner

Re: Cumulative Sales for Products over multiple years

Alluraiah,

This is working correctly. But when I put this into a KPI object I am getting a Null.

Thanks,

Partner
Partner

Re: Cumulative Sales for Products over multiple years

Sunny,

This is working correctly. But when I put this into a KPI object I am getting a Null.

Thanks,

Re: Cumulative Sales for Products over multiple years

KPI shows a single value, what do you expect to see in your KPI?

Frank_Hartmann
Honored Contributor II

Re: Cumulative Sales for Products over multiple years

try


Sum(Aggr(RangeSum(Above(Sum({<Year, Vintage>}Revenue), 0, RowNo())), Vintage, Year))


hope this helps

Re: Cumulative Sales for Products over multiple years

KPI shows a single value, what do you expect to see in your KPI?