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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

YTD Calculation

Hello All,

   

Channels Implemented
CountYTD
2017Jan110110
Feb107217
Mar221438
Apr194632
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Total632

I need to calculate the YTD column. Basically it is a summation of the count field, but it needs to be represented in a similar format in Qlikview. Any suggestions on the same ?

1 Solution

Accepted Solutions
sunny_talwar

There are two ways you can approach this

1) use The As-Of Table

2) Use RangeSum(Above(...)) function - >Accumulative Sums

View solution in original post

3 Replies
ali_hijazi
Partner - Master II
Partner - Master II

you need to do this in script

Load Year, Month, Count, if(rowNo() = 1 ,Count , Count + peek(YTD)) as YTD

order by Year, Month

then in your expression put sum(YTD)

I can walk on water when it freezes
tyagishaila
Specialist
Specialist

Load *,

Rangesum(Count, Peek(YTD)) as YTD

from ..............;

sunny_talwar

There are two ways you can approach this

1) use The As-Of Table

2) Use RangeSum(Above(...)) function - >Accumulative Sums