# New to QlikView

Discussion board where members can get started with QlikView.

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.

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".

15 Replies
MVP

## Re: Cumulative Sales for Products over multiple years

Seems like the same thing you asked here:

cummulative sales set analysis

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?

MVP

## 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

Valued Contributor

## Re: Cumulative Sales for Products over multiple years

please try his formula like ?

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

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

## 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,

MVP

## Re: Cumulative Sales for Products over multiple years

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

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

MVP

## Re: Cumulative Sales for Products over multiple years

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