Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
balajisj30
Creator
Creator

Display last 12 months data - qliksense

Hello People

I want to display last 12 months sales data of different categories in a line chart. So i wrote the set analysis expression,

Sum( {$<month1={">=$(=MonthStart(AddMonths(Max(month1),-12)))"}*{"<$(=MonthEnd(Max(month1)))"}>} sales)

I get last 12 months data when i select month filter but the categories are not getting displayed.

saa.png

Please help me solve this issue.

3 Replies
prma7799
Master III
Master III

Please try this

SUM({$< MonthName=, Year={$(=max(Year)-1)},Quarter=

,[month1]={">=$(=MonthStart(max([month1),-12))<=$(=Monthend(addmonths(max([month1]),-12)))"}

>}[sales]

balajisj30
Creator
Creator
Author

No. the code is not working. It gives me only selected month and selected - 12th month sales data. Even then categories are not getting displayed.

prma7799
Master III
Master III

Please share some sample app.