Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
bm59
Contributor III
Contributor III

Cumulative YTD month by month

Hi,

I would build a chart with each month display cumulative YTD.

My data look like:


Date      | Store  | Sales

2010/01    Paris     105

2010/02    Paris     100

2010/03    Paris     108

....

2010/11    Paris     167

2010/12    Paris     1898

2011/01    Paris     195

2011/02    Paris     1066

2011/03    Paris     1078

....

The final graph must look like; Cumulative 12 months each month

         | Fev10 To Mar11    |    Mar10 To Avr11   |   Avr10 To May11   |    May10 To Jun11   | ...

Paris  | 

...       |

Thx for your help.

12 Replies
Not applicable

Hi,

i hope this example helps you.

C u,

Stefano

lironbaram
Partner - Master III
Partner - Master III

hei

i used the very good example of stefano

i changed the expression a little bit so

it will go back only 12 month the original expression went back to the first monthfrom all dates

bm59
Contributor III
Contributor III
Author

Thank,

But I must reset the cumulative sum each year, how do this?

And I would like not display  the first 12 months.

Not applicable

Read more about  functions before() and/or above()

Not applicable

For Example:

sum(Sales) - above(sum(Sales))

but you should have expression sum (Sales) and then the cumulative expression

Not applicable

Hi,

look at this.

With a year field you have no problem with above.

C u,

stefano

bm59
Contributor III
Contributor III
Author

See attached file, the final chart result.

How do not display the firt year (2010)?

How reset cumlulative each year?

thx

Not applicable

Try this.

Stefano

John_Teichman
Former Employee
Former Employee

This is a technique to calculate rolling periods. It uses set analysis and requires some work in the load script. This should apply to this problem as well. I prefer this method over the rangesum() method because it looks at data outside of the chart. The rangesum() method only works on data inside of the chart, meaning the first several periods will not have the full accumulation.

Regards,
John Teichman