1 Reply Latest reply: Sep 12, 2017 10:08 AM by Andrea Gigliotti RSS

    QS: Rolling months in chart

    Tiia Ojanaho

      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

        • Re: QS: Rolling months in chart
          Andrea Gigliotti

          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.