Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Not applicable

QS: Rolling months in chart


Could somebody help me? I am trying to have bar chart where dimension (x-axis) would show past 13 months, not including current month. I have found several answers with Qlik view files and I have Qlik Sense Desktop so haven't been able to utilise them.

Dimension: =MonthName(IncidentReportedMonth)

     where IncidentReportedMonth is always the first day of the month

Expressions:    count({<[Resolution Category]={Advisory} , [Assigned Group]-={[Group1], [Group2]}>}[Incident ID])

                         count({<[Resolution Category]={Advisory} , [Assigned Group]={[Group1], [Group2]}>}[Incident ID])


This is otherwise fine, but I don't want this month (syys 2017=Sept 2017) to show and I want to know how can I limit months to 6, 12 or 13 past months so that I don't need to change anything when the month changes (i.e. rolling period).

BR Tiia

2 Replies
Honored Contributor II

Re: QS: Rolling months in chart

you could use something like below:

count( {< IncidentReportedMonth = {">=$(=MonthStart(AddMonths(Today(), -13)))<=$(=MonthEnd(AddMonths(Today(), -1)))"}, [Resolution Category]={Advisory} , [Assigned Group]-={[Group1], [Group2]} >} [Incident ID] )

or you can replace value of -13 with a variable the user can input.

New Contributor III

Re: QS: Rolling months in chart

Hello ,

Please use following Expression

Sum({<DateField={">=$(=num(Monthstart(max(DateField),-13)))<=$(=num(Monthend(max(DateField),-1)))"},Year=,Month=>} Sales)


Vikas Desai

Community Browser