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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Vidit
Creator
Creator

Calculated columns using previous values?

Hi,

i have an input table like this.

   

DateCategoryCountOffsetTotal
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.

Regards

Vidit

1 Reply
Anonymous
Not applicable

Hi Vidit,

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

Hope it helps.

-- Karla