Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

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

Current Year Current Month sales Vs Last Year Same Month sales

I have field like yearmonth, Year,Month and Sales. i want to show in line chart as Current Year Current Month sales Vs Last Year Same Month sales.

when i selecting specific yearmonth value, it's showing only for currentyear month value. how can we get last year value as well same time.

if i selecting year and month filter separate then its working, but user need yearmonth filter selection.

pls help. 

pfa , for snipping

2 Replies
Contributor II
Contributor II

I think the best way to do it it is with the separated filters (year ad month), but if the user insist...


You could load the same data table 2 times, but in the second (lets name it as "auxiliary"), when you upload the date, put this sentence:


load Sales as [Sales last year],

Date_sales+365 as [Date of last year sales]


And in the chart, create 2 expressions, one with sum(sales) and another with sum([Sales last year]. 

If you don't want to have a ugly chart, you can conditionate the second expression (to show it just when "year month" is selected if you want.


Best regards!

Support (Former)
Support (Former)

You can check out the following Design Blog post as well, should provide some further guidance on how to go about things:



To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.