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 15, 2018 in Tableau by Nitish
• 630 points
1,382 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 15, 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
9,428 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 5, 2018 in Tableau by xyz
• 1,560 points
493 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, 2020 in Tableau by Patrick
• 120 points

edited May 20, 2020 by Gitika 1,766 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 8, 2018 in Tableau by Nitish
• 630 points
720 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
• 33,030 points
506 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 10, 2018 in Tableau by Atul
• 10,240 points
1,263 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
2,163 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
2,375 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
3,503 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP