Hi, this is a one solution to your problem.
You can use parameters and calculative field too, other than filter or combination of both.
I used combination of both. ( I used color shelf to show the data from past n months. you can use size or shape shelf too)
1. Add a parameter to take the N value. (set the range to be from 1-12)
![](https://www.edureka.co/community/?qa=blob&qa_blobid=16006572686087565587)
2. Add a calculative field with text like this. (here the data for n months of only present year will be shown)
![](https://www.edureka.co/community/?qa=blob&qa_blobid=3979195238907887765)
3. This is a sample i used to show the data for past N months.
![](https://www.edureka.co/community/?qa=blob&qa_blobid=3656220941615102659)
4. Drag the calculated field "Orders from past N months" to color shelf to show the difference. You can now enter N value.
![](https://www.edureka.co/community/?qa=blob&qa_blobid=14854313157268264930)
5. you can see the data for past n months from color difference.
Hope this helps you.
Happy Learning.