5 Replies Latest reply: Jul 30, 2014 8:06 AM by James Dixon RSS

    Scroll Bar Selection, Show The Last Four Months of Max Date

      Hello all,

       

      Have been struggling on this for a while. I have a scroll-bar at the top of my Qlikview Document, where I will select a year range, so like 15June2013 - 15June2014 (field name: SalesDate)

       

      So I want a graph, where given this top selection, i get the sum of all sales for all of march 2014, and then all of april 2014, then may 2014, then june 2014 up to my current selection.

       

      The thing that I am struggling with is that

       

      =month(max(SalesDate))-1&'-'&Year(max(SalesDate)) works relatively well until i get to january, which gives back 0 as the month.

      There must be a simpler formula to enable you to calculate the previous 3 months sales to plot in a graph.