Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Periodic calculation


I need to calculate periodic data in qlikview script.

The issue is that data is stored in the data base in an acumulative way, so there is no periodic data in it. Therefore it is impossible to get periodic data directly from the data base.

My idea is to create a new dimension in the script in which I can store the calculation of: (month X data) - (month (X-1) data), but I really don´t know if this is the best solution and even if it´s so, how to implement it.

If anyone could help I would appreciate it¡

4 Replies

Re: Periodic calculation


Load *, Data-Peek('Data') as SplitData Inline [

Month, Data

Jan, 10

Feb, 20

Mar, 40

Apr, 100

May, 120

Jun, 150



Not applicable

Re: Periodic calculation

That works fine when data is stored one month after the other.

But this is not the case, so I have to specify in the script X month - (X-1)Month, so I can get the Year to Date data.



Re: Periodic calculation

Yes, otherwise you have to use Order By caluse to sort it accordinly and apply the same logic on sorted data.

Not applicable

Re: Periodic calculation

What if there is more than 1 record per month in the table?

Community Browser