Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
maxsheva
Creator II
Creator II

Manual Accumulation with two dimensions

Hi,

How can I create the same Full Accumulation for two dimensions as QV do it?

I use formula RangeSum(Above(TOTAL Aggr(Sum(Value1),Date),0, Date))

But in this case Accumulation is for all fields in Example field.

I need the same view like in "Accum Auto" expression.

The data and qvw file are below.

Thx.

Table1:

LOAD * INLINE [

Example, Date, Value1, Value2

Example1, 01/02/2017, 70, 70

Example1, 01/04/2017, 80, 80

Example1, 01/07/2017, 50, 30

Example1, 01/09/2017, 30, 50

Example2, 01/12/2017, 70, 70

Example2, 01/15/2017, 80, 80

];

tmp:

LOAD

  Example,

  Date(min(Date)) as MinDate,

  Date(max(Date)) as MaxDate

Resident Table1

Group By Example;

LOAD

  Example,

  Date(MinDate + IterNo() -1) as Date

Resident tmp

While Date(MinDate + IterNo() -1) <= MaxDate;

DROP Table tmp;

1 Solution

Accepted Solutions
sunny_talwar

If you have QV12, you can try this

Aggr(RangeSum(Above(Sum(Value1),0, RowNo())), Example, (Date,(NUMERIC)))

or if its okay, sort 1st by Example and then by Date ascending in your chart with this expression

RangeSum(Above(Sum(Value1),0, RowNo()))

Capture.PNG

View solution in original post

3 Replies
sunny_talwar

If you have QV12, you can try this

Aggr(RangeSum(Above(Sum(Value1),0, RowNo())), Example, (Date,(NUMERIC)))

or if its okay, sort 1st by Example and then by Date ascending in your chart with this expression

RangeSum(Above(Sum(Value1),0, RowNo()))

Capture.PNG

maxsheva
Creator II
Creator II
Author

Thank you Sunny, it works!

Is it normal for QV to use value which is not exist in data model such as 'NUMERIC'?

sunny_talwar

Yes, this is a new feature introduced with QV12. Take a look here

The sortable Aggr function is finally here!