Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Live chat with experts, bring your API Integration questions. June 15th, 10 AM ET. REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
andreina
Contributor
Contributor

Accumulated Expressions

Hello,

I have this source table:

Month,Amount, Perecentage

January 10 , 5

February20,4

February 30,6

Marcha 56,2

April 15, 1

And we need to make a simple table calculating a formula like

sum(Amount*Percentage)/sum(Amount) accumulated by month.

The result table should be something like:

Month, AccumulateValue

January 5 --> (10x5/10)

February 5,16 --> (10x5+20x4+30x6)/(10+20+30)

March --> 4 (10x5+20x4+30x6+56x2)/(10+20+30+56)

April--> 3,33(10x5+20x4+30x6+56x2+15x1)/(10+20+30+56+15)

How do I configure the expression?

Notice that in the new table there is no any accumulated colum.

Thank you,

1 Solution

Accepted Solutions
johnw
MVP
MVP

Attached are two approaches. The first uses above() to manually accumulate. The second links an AsOfMonth to all Months on or before then so that a simple sum() gives the accumulation. I prefer the second approach, as the first can be broken by simply changing the sort order or selecting values for Month.

View solution in original post

2 Replies
johnw
MVP
MVP

Attached are two approaches. The first uses above() to manually accumulate. The second links an AsOfMonth to all Months on or before then so that a simple sum() gives the accumulation. I prefer the second approach, as the first can be broken by simply changing the sort order or selecting values for Month.

View solution in original post

andreina
Contributor
Contributor
Author

Ohhh Thank you SO MUCH!.... My real problem was not to find the option "Hidden Column"!!!

Thank you,

Big Smile