Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

compare last two years

Hi,

i want to report the last two years of my value "lineamount" in a chart

my dimensions are year and month

my expressions

Sum({<TCMSALESORDERDATE = {">=$(=MonthStart( AddMonths(Max(TCMSALESORDERDATE),-12)))<=$(=Max(TCMSALESORDERDATE))"}>} LINEAMOUNT)

and

Sum({<TCMSALESORDERDATE = {">=$(=MonthStart( AddMonths(Max(TCMSALESORDERDATE),-24)))<=$(=Max(TCMSALESORDERDATE))"}>} LINEAMOUNT)

i get only one chart in which the values per month are added for the last two years...

can someone help?

2 Replies
amit_saini
Master III
Master III

jagan
MVP & Luminary
MVP & Luminary

Hi,

Try this expressions

For last 12 Months:

Sum({<TCMSALESORDERDATE = {">=$(=MonthStart( Max(TCMSALESORDERDATE),-12))<=$(=Date(Max(TCMSALESORDERDATE)))"}>} LINEAMOUNT)

For last 13 to 24 Months:

Sum({<TCMSALESORDERDATE = {">=$(=MonthStart(Max(TCMSALESORDERDATE),-24))<=$(=MonthEnd(Max(TCMSALESORDERDATE), -13)"}>} LINEAMOUNT)

Hope this helps you.

If not working attach some sample file.

Regards,

jagan.