1 Reply Latest reply: Sep 10, 2014 10:12 AM by Moritz Schiesser RSS

    Line Chart to show last 6 months

    Steve Hutchison

      Been struggling with this one for a while and although I find info on here it doesn't seem to do what I want or I can't get it to work at all.

       

      I have attached my qvw file with a graph. The layout is there or there about's, but I would like it to show the last six weeks/months of data regardless of filters.

       

      Dimensional limits don't work as there is no latest/last option.

       

      I have been trying expressions like the one below but it only seems to group the last X months together in one column

       

      =Sum({< YearDimensionName=, QuarterDimensionName=, MonthDimensionName =, DateDimensionName= {'>=$(=MonthStart(Max(DateDimensionName), -5))<=$(=Date(Max(DateDimensionName)))'}>} MeasureName)


      Any help appreciated.

        • Re: Line Chart to show last 6 months

          Steve,

           

          If I understood you right, you want the last 6 month bzw. 6 weeks to be displayed.

          First: how do you detect if you want to see weeks or months?

           

          To the solution:

           

          • Switch off any dimension limits
          • In the Presentation tab, activate 'Enable X-Axis Scrollbar'
          • Set 'When Number of Items Exceeds' to 6 (or whatever suits you)
          • activate 'Reversed' so it will take the 6 last values

           

           

          Should now display the last 6 months/ weeks only, just as you wish.

           

          I guess with that solution you can use simple expressions

           

           

          Hope that did help!

           

          Best regards!

           

          Moritz

           

          P.S. See the attached file where I did what I wrote above