25 Replies Latest reply: Nov 27, 2017 9:01 AM by youssef belloum

# cumulative probleme

I have a problem, I have a table has two column ,

1-DATE:date_s

1-Indicateur :

SUM({<date_s,month={"<=\$(=month)"},year={"=\$(=MAX(year))"},PRODUIT = {"CREDITS"} , NATURE={"CREDIT A LA CONSOMMATION"}>}PRODUCTTION_VOLUME_TND),

indicateur is the it is the cumulative measure from January to the month displayed in the date column

i used this expression but the result is false, after the analyzes I noticed that the result is date = date and not cumulative

• ###### Re: cumulative probleme

Hi,

you should use syntax like this:

=sum( {<date_s={">=01/01/2017  <=\$(=max(date_s))"}>} PRODUCTTION_VOLUME_TND)

• ###### Re: cumulative probleme

Hello youssef ,
I tested this expression but nothings changed because i have the date_s in the colunm So , the indicateur folow this date

• ###### Re: cumulative probleme

try just to test it (add it on a textbox for example)

if yo have data like this for examples:

Date, Mois, Indicateur

01/01/2017, 01, 100

01/02/2017, 02, 300

16/03/2017, 03, 400

27/04/2017, 04, 150

if you select 16/03/2017 on the date listbox, you will have Sum = 800

if you select 01/02/2017 on the date listbox, you will have Sum = 400

• ###### Re: cumulative probleme

my date FORMAT is MM/YYYY,

• ###### Re: cumulative probleme

it can causes problems

• ###### Re: cumulative probleme

no problem:

=sum( {<Date={">=01/2017  <=\$(=max(Date))"}>} Indicateur)

• ###### Re: cumulative probleme

Yes, i aleardy tested but no thing changed the problem is with th column date_s when i deleted , the indicator is true

• ###### Re: cumulative probleme

Try to share sample data or an app with the same problem

• ###### Re: cumulative probleme

I assumed that Date_s was a dimension in your chart. That's why I used another expression. As you mentioned below that isn't working properly. Maybe you could use TOTAL in your function, maybe with TOTAL <month>.

Like: sum( TOTAL {<Date={">=01/2017  <=\$(=max(Date))"}>} Indicateur)

• ###### Re: cumulative probleme

yes Van i used total , it works but , whe i selected two date for exemple 04/2017 and 03/2017
--->03/2017 is not true

• ###### Re: cumulative probleme

Have you tried:

sum( TOTAL <month>{<Date={">=01/2017  <=\$(=max(Date))"}>} Indicateur)

• ###### Re: cumulative probleme

the issue now is with MAX (date)

when i select  april and mars so the max date is 04/2017 and it sum the cumul to april

• ###### Re: cumulative probleme

first you said that:

whe i selected two date for exemple 04/2017 and 03/2017

--->03/2017 is not true

and also:

when i select  april and mars so the max date is 04/2017 and it sum the cumul to april  (which is not true also)

so can you tell what you want if you select 03/2017 and 04/2017, if you have data like this ?

date_s, PRODUCTTION_VOLUME_TND

01/01/2017, 100

01/02/2017, 300

16/03/2017, 400

27/04/2017, 150

• ###### Re: cumulative probleme

01/01/2017 100

01/02/2017, 400

16/03/2017, 800

27/04/2017, 950

• ###### Re: cumulative probleme

Hi Souad, in this simplified example the following solution works:

RANGESUM(ABOVE(SUM(PRODUCTTION_VOLUME_TND),0,ROWNO(TOTAL)))

• ###### Re: cumulative probleme

when you select MARS and APRIL, you want this:

01/01/2017 100

01/02/2017, 400

16/03/2017, 800

27/04/2017, 950

??

• ###### Re: cumulative probleme

yes

• ###### Re: cumulative probleme

the expression i gave you below give 950 if you select mars and april.

Good luck

• ###### Re: cumulative probleme

You could try:

RANGESUM(ABOVE(SUM({\$<month={"<=\$(=month)"},year={"=\$(=MAX(year))"},PRODUIT = {"CREDITS"} , NATURE={"CREDIT A LA CONSOMMATION"}>}PRODUCTTION_VOLUME_TND),0,ROWNO(TOTAL)))

• ###### Re: cumulative probleme

hello, van keep

this expression doesnt satisfaited my needs

• ###### Re: cumulative probleme

What is wrong with it? Does it give you incorrect result or no result?

• ###### Re: cumulative probleme

tOTAL FUNCTION IGNORE THE COLOUMN IN THE TABLE FOR EXEMPLE I ADDED AGENCE CLOMUN TOTAL , CALCULATED THE TOTAL AGENCE , So i need just calculated the cumulative indicateur for each agence

• ###### Re: cumulative probleme

If you add an extra dimension then you should add an aggregation over the rangesum.

AGGR(RANGESUM(ABOVE(SUM({\$<month={"<=\$(=month)"},year={"=\$(=MAX(year))"},PRODUIT = {"CREDITS"} , NATURE={"CREDIT A LA CONSOMMATION"}>}PRODUCTTION_VOLUME_TND),0,ROWNO(TOTAL))),AGENCE)