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
77 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
2,419 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,550 points
76 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,530 points
549 views
+1 vote
1 answer

How to add filter on different sheets based on clicks?

Go to Actions… (if you're on a dashboard, you ...READ MORE

answered Aug 1, 2018 in Tableau by Atul
• 10,240 points
69 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
70 views
0 votes
1 answer

Date filter - Tableau

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

answered May 8 in Tableau by Cherukuri
• 32,260 points
33 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
208 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
392 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
99 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
733 views