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: 
Not applicable

Cumulative Sum QlikView et QlikSense ?

Bonjour,

Nouvellement arrivé sur Qlik, j'ai tenté de prendre en main l'outil et je suis arrivé à un résultat quelque peu déroutant, en effet je souhaite faire un tableau graphique avec des éléments suivants:

Dimension:

- Date (Mois + Année)

Mesure:

- Tickets Ouverts sur 1 an (Cumulatif avec un tag "Open")

RangeSum(Above(sum(Status='Open'),0,12))

- Tickets Fermés sur 1 an (Cumulatif avec un tag "Closed")

RangeSum(Above(sum(Status='Closed'),0,12))

Je parviens à avoir cette option de cumul total très aisément sur QlikView et j'ai essayé de l'adapter sur QlikSense, je n'y parviens pas, les valeurs cumulées tendent dans le négatif au lieu du positif ... mais les valeurs sont bonnes à priori. La facilité d'utilisation de QlikView est impressionnante, mais je ne parviens pas à importer ce chart. Un exemple ici: Accumulative Sums

Une idée de ce qui bug ?

1 Solution

Accepted Solutions
sunny_talwar

Hi feldunost‌ -

I am not sure if you understand English or not, but brunobertels‌ wanted me to chip in and provide my suggestions.

1) This expression -> sum(Status='Open') will give a negative number. This is acting like a if statement. When True, if statement gives a -1 and when false it will give 0. So when you were trying to accumulate, you were essentially accumulating negative numbers.

Alternatives to your expression could be this Sum(If(Status = 'Open', 1, 0) or Count({<Status = {'Open'}>} Status)

Based on this, you can finally try one of these expressions:

Aggr(RangeSum(Above(Sum(If(Status = 'Open', 1, 0)), 0, 12)), ([Case Owner], (TEXT)), ([Case Created Date.autoCalendar.YearMonth], (NUMERIC)))

or

Aggr(RangeSum(Above(Count({<Status = {'Open'}>} Status), 0, 12)), ([Case Owner], (TEXT)), ([Case Created Date.autoCalendar.YearMonth], (NUMERIC)))

I am using a concept of sorting within Aggr() function which is explained here: The sortable Aggr function is finally here!

These expressions give me this:

I would hope Bruno to explain anything (or everything) that I wrote in English if you didn't understand it.

Best,

Sunny

View solution in original post

5 Replies
brunobertels
Master
Master

Bonjour

Sous Qlik Sense peut être ceci :

- Tickets Ouverts sur 1 an (Cumulatif avec un tag "Open")

RangeSum(Above(sum(Status='Open'),0,rowno()))

- Tickets Fermés sur 1 an (Cumulatif avec un tag "Closed")

RangeSum(Above(sum(Status='Closed'),0,rowno()))

Ou via un Agrr :

sum( aggr( rangesum( above( sum(Status='Open'),0,12) ),Month))


dernière piste peut etre que sous qlik sense la dimension Month (mois+année) pose problème avec le 12 de la formule ?


Dans ce cas essayer avec num(month)


Bruno


Not applicable
Author

Bonjour,

J'ai fait des tests sur tes recommandations de valeurs, et j'ai pu avoir un résultat qui se rapproche un peu plus de ce que je cherche à obtenir avec :

Tickets Ouverts sur 1 an:

sum( aggr( rangesum( above( sum(Status='Open'),0,12) ),[Case Created Date]))


La courbe devient croissante et cumulative, c'est donc une bonne chose, mais elle part d'une valeur initiale de -26 .

J'ai re-modifié légèrement, et enlevé un peu le superflu afin de te mettre le doc en PJ. Je commence un peu à saisir le concept de la date et j'ai pu faire un joli truc là dessus.

Peut-être arriveras-tu à voir ce qui m'a échappé.

sunny_talwar

Hi feldunost‌ -

I am not sure if you understand English or not, but brunobertels‌ wanted me to chip in and provide my suggestions.

1) This expression -> sum(Status='Open') will give a negative number. This is acting like a if statement. When True, if statement gives a -1 and when false it will give 0. So when you were trying to accumulate, you were essentially accumulating negative numbers.

Alternatives to your expression could be this Sum(If(Status = 'Open', 1, 0) or Count({<Status = {'Open'}>} Status)

Based on this, you can finally try one of these expressions:

Aggr(RangeSum(Above(Sum(If(Status = 'Open', 1, 0)), 0, 12)), ([Case Owner], (TEXT)), ([Case Created Date.autoCalendar.YearMonth], (NUMERIC)))

or

Aggr(RangeSum(Above(Count({<Status = {'Open'}>} Status), 0, 12)), ([Case Owner], (TEXT)), ([Case Created Date.autoCalendar.YearMonth], (NUMERIC)))

I am using a concept of sorting within Aggr() function which is explained here: The sortable Aggr function is finally here!

These expressions give me this:

I would hope Bruno to explain anything (or everything) that I wrote in English if you didn't understand it.

Best,

Sunny

Not applicable
Author

Hello,

Thanks for information, I didn't know there would be a sum be counted as negative the way you described it.

Quite expected indeed, I'll remember this for next time.

I'll be able to try it out Monday.

Could you delete the picture and possibly .qvf file because of data ?

The solution can remain here of course.

Thanks again !

sunny_talwar

I have deleted the image and the qvf file.

Best,

Sunny