Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
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¡
Like:
Load *, Data-Peek('Data') as SplitData Inline [
Month, Data
Jan, 10
Feb, 20
Mar, 40
Apr, 100
May, 120
Jun, 150
]
PFA
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.
Thankssss
Yes, otherwise you have to use Order By caluse to sort it accordinly and apply the same logic on sorted data.
What if there is more than 1 record per month in the table?