Discussion Board for collaboration on QlikView Scripting.
I'm having an issue where i'm not finding an solution for it. The challenge is the following:
The problem resides between those two steps. I needed to create an new measure that would be an running sum of some of those columns.
I've loaded all the qvd's and tried to make one new column with an formula from the resident table but without success.
I'm new to Qlikview so i'm probably missing some part.
Go to Solution.
Try using peek() or previous() functions in your load statement:
rangesum(peek(rum_sum),value) as rum_sum
Thanks it did work! For the case i placed above but my issue got a little bit more complex. Is it possible to make this way?
Just a little sorting and more checking with peek() function:
LOAD * INLINE [
day, country, value
1, US, 3
1, France, 4
2, US, 7
2, France, 2
if(peek(country)=country,rangesum(peek(run_sum),value),value) as run_sum
order by country, day asc;
drop table DAYS;
Thanks again swuehl.
Just to conclude after this running sum with partitioning of the variable country i had to create an expression to get the correct value per day independently of where i was drilling.
The expression should be something like this: sum(aggr(max(run_sum),COUNTRY,DAY))