Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to do cumulative sum for two dimension

Hi,

I would like to ventilate this   calculation "=sum({$<FlagOuvertFerme={'Ouverture'}>}CompteurTicket)- sum({$<FlagOuvertFerme={'Fermeture'}>}CompteurTicket)" on two dimensions  "month- year" and "status"


When i use on dimension  "month-year" and full accumulation  it's work




ph1.JPG

ph2.JPG

but when  i inserted  dimension of status,  it's not good, numbers are different

ph3.JPG

Can you help me?

Thank you

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

Just to tell you I finalize your solution and it works thank you again for your help

best Boubker

sunnyt.JPG

View solution in original post

12 Replies
sunny_talwar

May be try this with no accumulation selected:

=RangeSum(Above(TOTAL Sum({$<FlagOuvertFerme={'Ouverture'}>}CompteurTicket)- sum({$<FlagOuvertFerme={'Fermeture'}>}CompteurTicket), 0, RowNo(TOTAL)))

Anonymous
Not applicable
Author

thank you for your help but  it doesn't work figures are wrong whitout accumulation selected

ph4.JPG

sunny_talwar

Would you be able to provide a sample to look at?

Anonymous
Not applicable
Author

Here is the file


thank you very much

sunny_talwar

I think your issue is that some of the statut are missing dates.

Capture.PNG

If those were 0 or null, it could have a still worked. The issue is that they are missing. Read here for difference between missing value and null: NULL handling in QlikView

Once you fix this issue, your chart should be fixed.

Best,

Sunny

Anonymous
Not applicable
Author

Hi,

You were right, I did a test on an Exel file by creating null data on the missing status and it worked. So, I have to create null data in the model it will be difficile. Anyway thank you for your help


Best,

Boubker

Anonymous
Not applicable
Author

Hi,

Just to tell you I finalize your solution and it works thank you again for your help

best Boubker

sunnyt.JPG

sunny_talwar

Awesome

I am glad you finally made it to work.

Best,

Sunny

rprios90
Partner - Contributor
Partner - Contributor

Hello,
A cordial greeting,

I'm experiencing the same problem, do you think you can share the solution?