Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

cumulative data in chart

Hello,

I have a table like this

DateItemSale price
2/11item 120
2/11item 215
3/11item 125
4/11item 330

I need to build a line chart with cumulative sales over time on it.

I have a dimension of Date but how do I calculate a sum of sales up until that date in an expression?

Thanks!!

D

4 Replies
jeffmartins
Not applicable

Re: cumulative data in chart

Hi yallow83,

This post explains how to create an expression with accumulative sum.

http://community.qlik.com/blogs/qlikviewdesignblog/2012/10/12/accumulative-sums

Regards

Not applicable

Re: cumulative data in chart

Thanks - I am trying to do it that way now.

Not applicable

Re: cumulative data in chart

Hi,

I used the "full accumulation" option and it worked perfectly.

Now I want to use the resulting accumulated field (Sales To Date at cost) and add it to (Remaining Inventory at cost) to get Total Inventory at cost.

The second field should not be accumulative (Total Inventory at cost), but the first should (Sales To Date at cost).

I tried to just use the first field name (Sales To Date) in a formula for the second field (Total Inventory) without setting "full accumulation" checkbox, but it looks like it recalculates the field without accumulation.

Can I force it to use the already calculated field value (where accumulation is on)?

Many thanks!!!

jeffmartins
Not applicable

Re: cumulative data in chart

Hi yallow83,

You should create a formula for the "Sales To Date at cost" field without the full accumulation option checked.

Then add the "Sales To Date at cost" and "Remaining Inventory at cost" expressions to get the " Total Inventory at cost" expression.

See the attached file.

Regards