title: limit the number of months in ssrs
body: <p>I have a dataset, output of a sql query which  gives me the below output :</p>
  
  <pre><code>Year Month  TotalSales  TotalProducts
  2013   1          23233           45
  2013   2           3344           43
  2013   3             232             11
  2013   4            2232           23
  </code></pre>
  
  <p>I am trying to represent the above dataset in a table and a bar graph using SSRS.</p>
  
  <p>Is there a way I can limit the months to the last three months on SSRS ?? </p>
  
  <p>I am using the current month as a parameter in SSRS.</p>
  
  <p>So example : I choose month 4 as a parameter , i would like to see the results only for the months 4,3 &amp; 2 in the bar chart and the table</p>
  
  <p>Is there a way I can do it ?</p>
  
  <p>The actual query looks something like this : </p>
  
  <pre><code>SELECT ISNULL(x.[Month],z.[Month]) AS [Month],  
         ISNULL(x.Sum_Stores, 0) - ISNULL(y.Sum_SalesStores, 0) AS Difference , ISNULL(Sum_onetonine, 0) as EcontractsbetweenOneandNine........................
  FROM   
  (
      SELECT [Month], Sum(Stores) AS Sum_Stores 
      FROM   SUM_XXX 
      WHERE  [Year] = '2013' and Name = 'Pro'
      GROUP BY [Month]
  ) AS x
  FULL OUTER JOIN
  (
      SELECT [Month], Sum(tracts) AS Sum_SalesStores 
      FROM   SUM_yyy 
      WHERE  [Year] = '2013' and Name = 'Pro'
      GROUP BY [Month]
  ) AS y ON x.[Month] = y.[Month] 
  ............................
  </code></pre>