2 Replies Latest reply: Nov 23, 2011 2:36 AM by U R RSS

    Limiting the date range in the dimention in a Line Chart

      Hi All,

       

      I am trying to restrict the range of dates appearing on the X axis of a Line Chart.  on X Axis where as I have 2 years month end dates in the back end data file which is getting loaded.

      I have defined 6 variables which will get me the data of the last 6 month ends. Now I am trying to put those variable on the dimention so that only those last 6 month end dates appear in the X axis.

       

      Can anyone help me in providing the expresion that should be used to do it..?

       

      Thanks Guys in advance

       

      Cheers..

       

      Paul

        • Limiting the date range in the dimention in a Line Chart
          Stefan Wühl

          Hi Paul,

           

          I wouldn't use variables for that, but maybe a calculated dimension (you could also use set analysis in your expressions to limit the date range, but let's start with a calculated dimension).

           

          I assume you have a field Date with the month end dates and you want to show the last 6 months only.

           

          Then you might try (using this as calculated dimension expression in dimension tab):

           

          =if(Date>= addmonths(today(),-6), Date)

           

          and also check suppress NULL on dimension tab.

           

          If this is what you want, we can look into doing the same with set analysis, this is probably performing better on large data sets.

           

          Hope this helps,

          Stefan