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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
salto
Specialist II
Specialist II

Chart calculation

Hello community,

I come back with another inter-record question.

From this data table (well, something similar to this):

DateKeyAmount
2015/10/31A100
2015/10/31B50
2015/11/30A7
2015/12/31A45
2015/11/30B33
2015/12/31B75
2016/01/31A88
2016/01/31B44
2016/02/29A22
2016/02/29B234

I need a chart with an expression that, for every item, shows the Amount difference in that month versus Amount value in december of the previous year:

KeyDateAmount2
A2016/02/2922-45 (22 is current month value, 45 is the value in 2015/12/31)
B2016/02/29234-75 (234 is current month value, 75 is the value in 2015/12/31)

How can I get the value for 2015/12/31?

Many thanks in advance!

1 Solution

Accepted Solutions
sunny_talwar

Not sure which one you want, but may be this

Capture.PNG

View solution in original post

3 Replies
sunny_talwar

For Key A, 88 seems to be on 2016/01/31. Is that a typo?

sunny_talwar

Not sure which one you want, but may be this

Capture.PNG

Anonymous
Not applicable

Hi

for current month   KEY A

Sum({$<[Date]={"$(=Date(Max(Date), 'YYYY/DD/MM'))"},Key=A>} Amount)

For December of previous year KEY A

Sum({$<[Date]={"$(=Date(yearend(Max(Date),-1) 'YYYY/DD/MM'))"},Key=A>} Amount)