Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

Cumulative Sales - Chart in line

Hi everybody,

I'm new to qlik sense and I would like to create a chart in line with cumulative sales.

It's easy to do it with excel or Qlik View but I don't succeed with Qlik Sense (eg. attached file)

I've tried this script with qlik sense but it doesn't work :"rangesum(above(sum({$<JOURNAL={"VEN Ventes"}>}SOLDE),0,rowno()))"

With qlik view I just need to chek the box "Full accumulation"

Could you please Help me ?

Thank you for your help.

Sincerely

1 Solution

Accepted Solutions
jsn
Honored Contributor

Re: Cumulative Sales - Chart in line

Hi Julien,

Try creating two measures:

rangesum(above(sum({$<JOURNAL={"VEN Ventes"}, EXERCICE={'5/31/2014'}>}SOLDE),0,rowno()))

and

rangesum(above(sum({$<JOURNAL={"VEN Ventes"}, EXERCICE={'5/31/2015'}>}SOLDE),0,rowno()))

5 Replies
jsn
Honored Contributor

Re: Cumulative Sales - Chart in line

Hi Julien,

Strange - your data & expression seem to work well on my end.

Tested in the new Qlik Sense 2.0.1.

Attached is the QVF file.

abhaysingh
Contributor III

Re: Cumulative Sales - Chart in line

Hi Johannes,

i have one query in that please clarify,

Dimension= MOIS

Measure= sum(SOLDE)

output for MOIS 1 is value 81.88K

For Cummulative logic-

Dimension= MOIS

Measure= rangesum(above(sum({$<JOURNAL={"VEN Ventes"}>}SOLDE),0,rowno()))

Output for MOIS 1 is value 152K approx

but cummulative says

a,a+b,a+b+c and so on .... so in that case value of a should be 81.88K in both cases right??

please correct me if i m wrong...

thanks

abhay

Not applicable

Re: Cumulative Sales - Chart in line

I Abhay and Johannes,

Thank you for your help.

I agree with Abhay, there is a problem with this chart.

I think I have found the problem but I don't know how to fix it.

In this chart :

Month 1 is the cumulative sum of Month 1 (EXERCICE 31/05/2014) + Month 1 (EXERCICE 31/05/2015)

Month 2 is the cumulative sum of Month 1 + Month 2 (EXERCICE 31/05/2014) + Month 1 (EXERCICE 31/05/2015)

It's not correct.

As Abhay said, I would like 2 lines in my chart.

First line with cumulative sales for Fiscal Year 31/05/2015

Second line with cumulative sales for Fiscal Year 31/05/2014

I tried to add Dimension EXERCICE but it doesn't work...

Have you an idea ?

Thank you

jsn
Honored Contributor

Re: Cumulative Sales - Chart in line

Hi Julien,

Try creating two measures:

rangesum(above(sum({$<JOURNAL={"VEN Ventes"}, EXERCICE={'5/31/2014'}>}SOLDE),0,rowno()))

and

rangesum(above(sum({$<JOURNAL={"VEN Ventes"}, EXERCICE={'5/31/2015'}>}SOLDE),0,rowno()))

Not applicable

Re: Cumulative Sales - Chart in line

Thank you Johannes.

It works with 2 measures !!

Great