Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QS: Rolling months in chart

Hi!

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])

Figure.PNG

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
agigliotti
Partner - Champion
Partner - Champion

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.

vikasdesai
Partner - Contributor III
Partner - Contributor III

Hello ,

Please use following Expression

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

Regards

Vikas Desai