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

0 votes

I am creating a dashboard that shows the last 7 days of data as shown below

https://i.stack.imgur.com/lmSLS.png

However, if the user filters for a specific date lets say March 6, I need to show data for the previous 7 days starting Mar 6 (Feb 28 - Mar 6). How could I get this built in a Tableau dashboard to have the last 7 days change dynamically depending on the user actions?

Aug 14, 2018 in Tableau by Nitish
• 630 points
270 views

1 answer to this question.

0 votes

You can create a parameter for dates. Select data type as date, allowable values to list, and add it from your date field. Right click on this parameter, and select Show parameter control option.

Then, generate a boolean calculated field using this parameter, something like:

DATEDIFF('day',[Your Date Field],[Date Parameter])<7
AND DATEDIFF('day',[Your Date Field],[Date Parameter])>=0

Drag this field to filters, and select only True values.

answered Aug 14, 2018 by AwesomeSauce
• 860 points

Related Questions In Tableau

0 votes
1 answer

How to color code cells of a column based on the text value in Tableau

You can use the following steps to ...READ MORE

answered Mar 27, 2018 in Tableau by Atul
• 10,240 points
4,757 views
0 votes
1 answer

How can I filter my data to see the results for 8 days ago?

Hey try these steps and let me ...READ MORE

answered Sep 4, 2018 in Tableau by xyz
• 1,560 points
149 views
0 votes
0 answers

Dynamically set the value of a filter based on a parameter selection in use to swap sheets

So I created a parameter to swap ...READ MORE

May 20 in Tableau by Patrick
• 120 points

edited May 20 by Gitika 254 views
+1 vote
1 answer

How can I filter data on different sheets based on clicks on Tableau

Filter actions are an essential and fundamental ...READ MORE

answered Jul 19, 2018 in Tableau by Atul
• 5,540 points
2,817 views
0 votes
1 answer

How to create a filter based on date range?

You can use this code snippet in ...READ MORE

answered Aug 7, 2018 in Tableau by Nitish
• 630 points
189 views
0 votes
1 answer

Date filter - Tableau

Hi Karthick, 1. Add the date field to ...READ MORE

answered May 8, 2019 in Tableau by Cherukuri
• 32,490 points
72 views
0 votes
1 answer

How can I convert week into Date(mm/dd/yyyy)?

Right click on your date field, you'll ...READ MORE

answered Aug 9, 2018 in Tableau by Atul
• 10,240 points
456 views
0 votes
1 answer

Action filter (on set) is appearing in my worksheet.

Those are the action filters that we ...READ MORE

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

How to merge Year ,Month and date in Order Date in Tableau?

Hi, you can simply drag the Order ...READ MORE

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

Want to hide the Bar for Grand Total in the bar chart in Tableau

Tableau treats the whole visualization uniformly.  If you ...READ MORE

answered Aug 10, 2018 in Tableau by AwesomeSauce
• 860 points
1,375 views