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

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Ceb
Contributor III
Contributor III

Rangesum inside a rangesum function to calculate Cummulative sum

Hi,

 

I have used RangeSum to calculate Cumulative count by month( a member from the community helped me out).  

RangeSum(above(If(Day = 1,
(BusinessDays/(max(BusinessDaysYear))*Max(Target)), 0), 0, RowNo()))

This I then divided by the business days which would then give me target per day

RangeSum(above(If(Day = 1,
(BusinessDays/(max(BusinessDaysYear))*Max(Target)), 0), 0, RowNo()))/BusinessDays

Next, I am trying to use rangesum again to find the cumulative sum of the above daily target but I am not able to do. I tried using the AGGR function but to no use.

Is it possible to use a rangesum function on top of another rangesum function? Something similar to this?

RangeSum(Above( SUM (
RangeSum(above(If(Day = 1,
(BusinessDays/(max(BusinessDaysYear))*Max(Target)), 0), 0, RowNo()))/BusinessDays
) , 0, RowNo()))

 

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

Not sure, but may be you just need this?

RangeSum(Above(
  RangeSum(Above(
    If(Day = 1, (BusinessDays/(max(BusinessDaysYear))*Max(Target)), 0)
  , 0, RowNo()))/BusinessDays
, 0, RowNo()))

 

View solution in original post

1 Reply
sunny_talwar

Not sure, but may be you just need this?

RangeSum(Above(
  RangeSum(Above(
    If(Day = 1, (BusinessDays/(max(BusinessDaysYear))*Max(Target)), 0)
  , 0, RowNo()))/BusinessDays
, 0, RowNo()))