How to get past N months date from data source?

0 votes
How to get past N months data from data set for present year? Can we only use filter or is there any other way?
Mar 1, 2019 in Tableau by ch
• 3,380 points

edited Mar 1, 2019 by ch 114 views

1 answer to this question.

0 votes

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)

2. Add a calculative field with text like this. (here the data for n months of only present year will be shown) 

3. This is a sample i used to show the data for past N months.

4. Drag the calculated field "Orders from past N months" to color shelf to show the difference. You can now enter N value. 

5. you can see the data for past n months from color difference. 

Hope this helps you.

Happy Learning.

answered Mar 1, 2019 by Cherukuri
• 32,460 points

Related Questions In Tableau

0 votes
1 answer

How to calculate weekly average from daily data?

You can create these calculated fields: Unique Weeks ...READ MORE

answered Jun 26, 2018 in Tableau by Atul
• 10,240 points
2,706 views
0 votes
1 answer

How to refresh the extracted data source automatically in Tableau Desktop?

Hi AwesomeSauce, This comes up every so often!  Tableau ...READ MORE

answered Aug 13, 2018 in Tableau by Naruto
• 710 points
2,163 views
0 votes
1 answer

How to display days data based on date selected in the filter by the user.

You can create a parameter for dates. Select data ...READ MORE

answered Aug 14, 2018 in Tableau by AwesomeSauce
• 860 points
146 views
0 votes
1 answer

Replacing Data Source from one Server to Another

I did something similar to it For ...READ MORE

answered Sep 19, 2018 in Tableau by Naruto
• 710 points
57 views
0 votes
1 answer

Create global filter from single/multiple data source to multiple data sources on dashboard.

Hi Sindhu, You can use filters from worksheets in ...READ MORE

answered Mar 11, 2019 in Tableau by Cherukuri
• 32,460 points
166 views
0 votes
2 answers
+2 votes
1 answer
0 votes
0 answers

How to export the IdP (Identity provider) XML Metadata from Keycloak which is imported to Tableau?

Keycloak version 1.6.1, Goal: Keycloak should act ...READ MORE

Mar 28, 2018 in Tableau by Atul
• 5,530 points
710 views
0 votes
1 answer

How to get only the last n months action of all my records?

Hi Nithin, You can use Calculated field to ...READ MORE

answered Mar 8, 2019 in Tableau by Cherukuri
• 32,460 points
85 views
0 votes
1 answer

How to find first n months profit/sales for a given year

Hi Sindhu, You can use Calculated field to ...READ MORE

answered Mar 8, 2019 in Tableau by Cherukuri
• 32,460 points
57 views