Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
nacera_abbas
Contributor II
Contributor II

Cumulative Dimension

Hello,

I'm facing an issue about rangesum function in a Pivot table,

I calculate a cumulative amount like this

The expression:

if((Dimensionality())=1,

rangesum( sum(  aggr(   rangesum(   above(  Sum( {$<expr>} Amount)  ,0,rowno(TOTAL)  )  )  , Dimension 1  )  )

, sum (Amount)

I have 2 dimensions:

Dimension1 diplayed in rows and Dimension2 displayed in Columns.

This is how we want to display the pivot table:

Dimension1Dimension3Dimension4Dimension2Z1Z2Total
AA1102030
AA2A21134
AA2A22123
AA2A23246
AA2A24156
AA2Total41418
ATotal143448
BB1235
BTotal163753
C173855
D183957
E194059
FF1123
GTotal204262
Total204262

And for the moment I have this:

   

Dimension1Dimension3Dimension4Dimension2Z1Z2Total
AA1102030
AA2A21134
AA2A22123
AA2A23246
AA2A24156
AA2Total41418
ATotal34034
BB1235
BTotal53053
C55055
D57057
E59059
FF1303
GTotal62062
Total62062

Does anyone has any idea on how I could fix this issue?

Many thanks,

Nacera

Ce message a été modifié par : nacera abbas

Labels (1)
14 Replies
nacera_abbas
Contributor II
Contributor II
Author

Hi stalwar1‌,

Is there any way to handle the null value in the expression?

Many thanks,

sunny_talwar
MVP
MVP

Which null? The one I mentioned above in my post?

nacera_abbas
Contributor II
Contributor II
Author

Yes, those ones.

I tried to add fictif rows with zeros but I can't imagine all cases to do that

sunny_talwar
MVP
MVP

Best way is to generate missing data in the script

Generating Missing Data In QlikView

nacera_abbas
Contributor II
Contributor II
Author

Thank you, I will take a look at this