Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

cumulative sum style question

Hi Guys,

Can anyone help me have a column with cumulative sales info from the beginning of time in my data i.e. Jan 2008?

Thanks

C

1 Solution

Accepted Solutions
Not applicable

Re: cumulative sum style question

swuehl, thanks for the help.  I used a mixture of your suggestion and a bit of research into other things and came up with what I needed.  It looks something like this -

=sum({<[Transaction Date] = {"<=$(=max([Transaction Date]))"}, Year, Month>}Sales)

Seems to work so far.

Thanks again

C

6 Replies
MVP
MVP

Re: cumulative sum style question

Try an expression like

=rangesum(above(sum(Sales),0,RowNo()))

Not applicable

Re: cumulative sum style question

Thanks swuehl, that is exactly where I am currently.  However I need to go one step further. 

What do I add to the expression so that I can select 2009 and April from the dimension and it then I still get a cumulative from Jan-2008 through to April 2009?

MVP
MVP

Re: cumulative sum style question

Maybe

=rangesum(above(sum({<[Transaction Date] = {"<=$(=max([Transaction Date]))"}, Year, Month>}Sales),0,RowNo()))

Not applicable

Re: cumulative sum style question

That works! thanks.

Now my issue is if I replace the date dimensions with the Products it doesn't work.  I want a tbale that gives me sales to date (right from the beginning of time) for each product.  I initially simplified it think that the next bit would work fine.

MVP
MVP

Re: cumulative sum style question

Then your SalesToDate expression might be a good start. What about changing it to

=sum( {$<[Transaction Date]={"<=$(vEnd)"},Year,Month >}  Sales)

Not applicable

Re: cumulative sum style question

swuehl, thanks for the help.  I used a mixture of your suggestion and a bit of research into other things and came up with what I needed.  It looks something like this -

=sum({<[Transaction Date] = {"<=$(=max([Transaction Date]))"}, Year, Month>}Sales)

Seems to work so far.

Thanks again

C

Community Browser