Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.


Calculated columns using previous values?


i have an input table like this.


Q4 2015D9
Q1 2016A9
Q1 2016B3
Q1 2016C8
Q1 2016D7
Q2 2016A7
Q2 2016B5
Q2 2016C2
Q2 2016D7

i need to calculate the columns Offset and total. the logic for which are as follows


Total (calculated each quarter)Value D of previous Qtr  + value A of current \Qtr
Column Offset (for each category each quarter)
offset of ATotal- A for current Qtr
Offset of BTotal -  B For Current Quarter
Offset of CTotal -  B - C
Offset of DAlways 0

I need to create a dynamic logic for this, as data for more years may come.

They can be calculated in script or via expressions.

Please suggest. thanks in advance.



1 Reply
Contributor III

Re: Calculated columns using previous values?

Hi Vidit,

Please check the attached qvw for an example of how to calcuate values in script.

Hope it helps.

-- Karla