Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
nayanpatel
New Contributor II

Calculating carry forwarded Month data

Hi Friends,

I have data as given below and i want to calculate carry forwarded sum as an example

For City London For April its 1 for May its 1 and For Jun its 1. Now I want to calculate

If I select Jun 14 then result will be for City London=6 i.e Arp 1 will go to Apr,May,Jun(3) then May's 1 will go to May,Jun(2)

and Jun's 1 will be for Jun only as this is for Jun selection.

If user will select Sep-14 then it will calculate as Apr's 1 will go for Apr, May,Jun,July,Aug,Sep, etc.

CityApr-14May-14Jun-14Jul-14Aug-14Sep-14Oct-14
Japan0000000
Mumbai0000000
Delhi0000000
Newyork0000230
Aus3363465
Puri0000000
SenM0000000
Peris0000110
London1110002
sydney0000000
Leeds0000000
Birmingham0000000

Thanks you

2 Replies
aaronnash
New Contributor II

Re: Calculating carry forwarded Month data

EDITED (had it backward):

Nayan,

I think you are looking for an expression that looks like this:

 

sum

({$ <Date={"<=$(=date(max(Date)))>=$(=addmonths(Min(Date)100))"} >} Entry)

nayanpatel
New Contributor II

Re: Calculating carry forwarded Month data

Hi Aaron Tanks for reply,

but its not like that

Its like

Apr May Jun

1       1      1

Then o/p as

Apr May Jun

1     1       1

        1      1

                1

JunTotal= 6

Community Browser