Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

balajisj30
New Contributor III

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
Honored Contributor III

Re: Display last 12 months data - qliksense

Please try this

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

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

>}[sales]

balajisj30
New Contributor III

Re: Display last 12 months data - qliksense

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
Honored Contributor III

Re: Display last 12 months data - qliksense

Please share some sample app.

Community Browser