Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
sandralm
Partner - Contributor II
Partner - Contributor II

Cumulative Values in Line Chart - Rangesum - Above with zeros 0 and null values

Hi you all there!    I need your help 

 I am trying to get  the cumulative value of  field Flujo  in a Line  chart where dimension is  Fecha  (date)   and  Fondo

EXPR1 doesn t seem to work when values are Zero.    (See numbers in yellow)

EXPR2  is desired result but when I  try this expression in a line Chart it doesn t work .  

 

EXPR1:  aggr(RANGESUM(ABOVE(SUM(FlujoDiario), 0, ROWNO()) ), Fondo, Fecha)

EXPR2:  RANGESUM(ABOVE( total aggr(SUM((FlujoDiario)), Fondo, Fecha), 0, ROWNO()))

 

 Cum1.png               Cum2.png

 

May be a help you  know Fondo  is made of FondoClase at date level

 

Cum3.png

any help wil be welcome!

 

 

 

 

 

Labels (1)
1 Solution

Accepted Solutions
sandralm
Partner - Contributor II
Partner - Contributor II
Author

After many tries, I found the solution  myself.    Hope helps others

 

If the table is not  sort  correctly, the RANGESUM  function may not work correctly. So I used the  StructuredParameter  of the AGGR function

EXPR1:  aggr(RANGESUM(ABOVE(SUM(FlujoDiario), 0, ROWNO()) ), Fondo, (Fecha , NUMERIC ASCENDING))

 

 

View solution in original post

2 Replies
sandralm
Partner - Contributor II
Partner - Contributor II
Author

After many tries, I found the solution  myself.    Hope helps others

 

If the table is not  sort  correctly, the RANGESUM  function may not work correctly. So I used the  StructuredParameter  of the AGGR function

EXPR1:  aggr(RANGESUM(ABOVE(SUM(FlujoDiario), 0, ROWNO()) ), Fondo, (Fecha , NUMERIC ASCENDING))

 

 

Angela_Zhou
Contributor III
Contributor III

Thank you for this post, it helps the similar issue Cumulative Values incorrect issue in multi-Line Chart. I had to fix two place:

  1. Loading script to force DimDate to be a Dual value:  Date(Date#(DimDate ), 'M/D/YYYY')
  2. aggr(RANGESUM(ABOVE(SUM(myDataField), 0, ROWNO()) ), DimOne, (DimDate, NUMERIC ASCENDING))
Angela Z.