Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
souadouert
Specialist
Specialist

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

25 Replies
YoussefBelloum
Champion
Champion

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

avkeep01
Partner - Specialist
Partner - Specialist

Hi Souad,

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)

souadouert
Specialist
Specialist
Author

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

avkeep01
Partner - Specialist
Partner - Specialist

Hi Souad,

Have you tried:

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

souadouert
Specialist
Specialist
Author

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 

YoussefBelloum
Champion
Champion

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

souadouert
Specialist
Specialist
Author

01/01/2017 100

01/02/2017, 400

16/03/2017, 800

27/04/2017, 950

avkeep01
Partner - Specialist
Partner - Specialist

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

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

sunny_talwar

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

souadouert
Specialist
Specialist
Author

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