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

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

Some questions around date calculations

I am having what I think are pretty basic problems using the date month calculations.  The overall goal is to take a list of running total dollar amounts, each with a month end figure on it (1/31/2017, for example) and be able to:

  • have an amount of the change one month to the next
  • get a better understanding of calendar calculations

Here's the data:

   

DateSpendingAccount
10/31/2016$350,264,190Acct1
11/30/2016$362,224,281Acct1
12/31/2016$374,005,501Acct1
1/31/2017$386,218,685Acct1
2/28/2017$397,040,591Acct1
3/31/2017$409,463,645Acct1
10/31/2016$66,112,058Acct2
11/30/2016$67,377,474Acct2
12/31/2016$68,476,345Acct2
1/31/2017$69,484,253Acct2
2/28/2017$70,380,048Acct2
3/31/2017$71,126,464Acct2
10/31/2016$32,569,525Acct 3
11/30/2016$32,596,068Acct 3
12/31/2016$32,830,646Acct 3
1/31/2017$33,168,770Acct 3
2/28/2017$33,416,697Acct 3
3/31/2017$33,891,492Acct 3

Also, I write this in script:    Month(Date) as cMonth, I get Oct, Nov, etc.  But, if I write:  Month(Date)-1 as pMonth, I get a numeric return: 3,2,1,0, etc.  The order and the number seem correct, but I'm not able to use it to select the prior month's spending.  Sorry if this is a novice question.

0 Replies