Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
simongoodman
Contributor

Accumulation with Rangesum and multiple dimensions

I am trying to create an accumulation of values('Days') based on multiple dimensions(ProductId & Phase).

I have discounted the Chart Accumulation method and tried the 'rangesum(above(sum(x), expr2))' expression method but not got it working. What is the correct expression per this example?

The second issue centers on blank field dates. In the script I can create an IF with peek function but where there blanks for two or more fields etc what is the best solution? I assume it is a loop in the script. In the attached qvw example how would it work?

Many thanks in advance

Simon

1 Solution

Accepted Solutions

Re: Accumulation with Rangesum and multiple dimensions

Try this:

=Rangesum(Above(sum(Days), 0, RowNo()))


Capture.PNG

View solution in original post

5 Replies

Re: Accumulation with Rangesum and multiple dimensions

What is the expected output here? Can you elaborate?

simongoodman
Contributor

Re: Accumulation with Rangesum and multiple dimensions

  Hi Sunny

Below is an expected output for CumDays for issue 1 and ExpectedDate for issue 2.

OrderIdProductIdPhaseDaysCumDaysExpectedDate
AA101042016113303/03/2016
AA101042016122505/03/2016
AA101042016134910/03/2016
AA201042016214416/04/2016
AA201042016222616/04/2016
AA201042016231717/04/2016
AA2010420162431017/04/2016
BB110042016313313/04/2016
BB110042016321413/04/2016
BB110042016331513/04/2016
BB110042016341615/04/2016
BB110042016352819/04/2016

Thanks

Simon

Re: Accumulation with Rangesum and multiple dimensions

Try this:

=Rangesum(Above(sum(Days), 0, RowNo()))


Capture.PNG

View solution in original post

Re: Accumulation with Rangesum and multiple dimensions

For the ExpectedDate requirement, you can try this:

=Date(If(Len(Trim(AllCompletedDate)) > 0, AllCompletedDate, Above([Exp Label])))

But this might not look good when you make selections because it is self referencing itself.

Capture.PNG

Highlighted
simongoodman
Contributor

Re: Accumulation with Rangesum and multiple dimensions

I now understand my error re:rangesum and dimensions. I will test this solution with an actual large dataset.

As for your ExpectedDate solution I look into this further. As you said it is self referencing.

Thanks

Simon