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

Announcements
Talend Cloud AWS EU Scheduled Outage: Starting Tues 26 May 21:00 CEST with expected completion Wed 27 May 01:00 CEST
cancel
Showing results for 
Search instead for 
Did you mean: 
annabergendal
Partner - Creator
Partner - Creator

Sales selected months last year

How can I get sales for selected period last year?

If user selects 2015-03, how can I get sales for 2014-03?

See attached,

Thanks!

Labels (1)
11 Replies
tamilarasu
Champion
Champion

Then Try,

sum({<YeasrMonth={$(=Concat(Chr(39)&Date(Addmonths(Date#(YeasrMonth,'YYYY-MM'),-12),'YYYY-MM')& Chr(39),','))}>}Sales)

!

annabergendal
Partner - Creator
Partner - Creator
Author

Thanks tresesco and Tamil!

Your idea of defining an interval in the variable works!

Thanks to both of you, and also others who replied to this.

BR

Anna