How to set default Date Range from (Today - 5) to Today. i.e., eg: Date Range : 13 - 07 - 1992 to 17 - 07 - 1992 as a default

0 votes
Jul 17 in Tableau by Ushasree
• 120 points
221 views

Thank you for answering.

I mean what i need exactly is, 

Here, we are having fltdata (which gives the dates) .  for that selected date range i need the volume, high price, low price, and all..  only for that selected range.   Here, I am confused what parameter or Calculated field i need to create as i am new to tableau.  Please do help.  Thank you

You can use the calculated field as you created by providing offset as -5 instead of 5 to get 5 days back.

Then create a new calculated field to compare dates if it lies between today and default and group them.
Could you pls tell me how to group them ?
If any doubt, do revert back.

2 answers to this question.

0 votes

Like I said in the comment, 

Create a CF like below [ Replace Fitdate instead of Order Date in your calculated field] 

Now drop the created field instead of [Fitdate]. You will see dates that will fall within the range of these dates.

answered Jul 17 by Cherukuri
• 31,840 points
The field above will contain a group of dates within the range.
Thank you so much :)

It helped me.

I need a parameter as Default,  Custom

In default,  we got the date range today - 5 to today

and in custom, we need to get all the dates according to flt dates.  

both should be visible.  user selects it.

I mean, if i click on default.  i should see last 5 days from today.

if custom, i need to display a calendar

Here, Default should be as calculation 1 and custom should be flt dates as a calendar view.

I need to filter both Default and Custom ...  User choice. 

whatever we want to see, i will see.

but default should be in range of today - 5 to today

Hi Ushasree, 

Do as you see in below image

Create a new parameter and click on Set from field and select the CF I created above.

You will see the whole calendar of dates but you can select only those range of dates.

Hope it helps!

In parameter data type,  range am unable to see as a calendar.  even though i selected min and max range of values.

Here, i need a calendar view.   in range of min and max dates

you will see a calendar when you click on the input, by default no calendar will be shown for date type parameter
In the slider view, you will not see a calendar view. it is only seen in the type-in parameter.
ok thank you so much for your time.

I will work on it further.

Thanks
Sure, I'm happy to help.
Could you please tell me,

How to Update my Start and End dates parameter or Filter with Today and Last 5 Days Date Automatically ??i.e if i open my worksheet tomorrow, i should automatically get updated with tomorrow and tomorrow-5 days dates ...

Thank you
Hi Usha, Parameters are static variables, so they cant update by themselves. Each time you need to edit the parameter and set from the field.
ok thank you so much for your reply.
Did you get a solution regarding updating the date range automatically?
No. Am working on it. Once i get any solution, i will share with you.

Thank you
Sure.

I think you can make use of sets.
i didn't get u.  I mean what sets ?
You can create a set on [Fitdate] which is greater than default and less than today's date. Then use the set.

A set is dynamic similar to the calculated field, so it will update dates automatically.

I have given default to set as today -5  to today date.

But it is not updating for me daily.

When i opened today. i can still see the end date as 07/18/2019 where as i am not getting todays date - 5  automatically.

Is [today] a calculated field created by you in DefaultDateRange? What does it contain?

it just contains Today() function

Ushasree keep DefaultDateRange instead of [Fitdate] in row shelf. So you are not seeing updated dates I think.

Try once.

No, but i applied DefaultDateRange in filter 

I cant remove fltdate in rows column as my data is filtering with that field..  when i click on show filter for DefaultDateRange  right side i can see end date as yesterday date. but not today.  It is not updating daily.

So DefaultDateRange is in filter shelf, how are you filtering dates?

Can you share your dataset if it is not confidential or any dummy data?

It is updating for me. see below images -

It changes once your date changes.

Try once again, the range is also updating.

Am so sorry i cant share the data set.

Ha it's updating for me also.  

But what i need exactly is,

i selected a date range yesterday i.e., today - 5 to today

it updated me yesterday 13 july to 18 july

when i opened it today it changed start date as 14 july but end date as 18 july only.

if i open tomorrow, i need to see 15 july to 20 July.

It should update automatically.
It should update automatically when you open the sheet.
it is updating start date.  but end date is not changing :(

As soon as i opened today, it says 15 july as start date and end date as 18 july

Then something is wrong with today's date. Instead of [today] in DefaultDateRange field put as Today() function itself.

ha i tried it.  but its not working for me.  :(

if i remove DefaultDateRange in filter and add again it into filter, then its updating.  but i want filter to be updated automatically.

M facing this many times. for each save or some change

This shows up if you add/ change a field or calculated field with many distinct value fields in detail or row/column shelf. So it takes time.
What operation did you perform?

that is resolved.  i followed few precautions for out of memory and taking time..

Now, could you pls help me for the following:

I had a parameter which consists of Custom and Default

in that,

Start date and End Date..

when it is Custom,  i need to get start date and end date.

when it is default,  i want to hide start date and end date.

Note:  Its in dashboard.   

Hi Usha, I tried a similar problem as yours, but I couldn't achieve the expected result. Maybe you can try this way, See this video it explains by swapping sheets to hide the parameters.

https://vimeo.com/107352893

I will go through it.

Thank you
I found a solution for all my problems. i.e., Story lines.

I can hide sheets, filters by creating dashboards and merging those dashboards and moving it into story

Thank you
Thanks for sharing. So you used the last 5 days in one slide and Custom days parameter in another slide in the story and then hide the other parameter. Am I right?
Exactly... it worked for me..

Thank you
0 votes

A set can dynamically change as per condition, so you can try sets instead of creating parameter and calculated field.

Use the above field to show default last 5 days.

answered Jul 30 by Prajwal
Thank you so much..

It resolved for me..
Hi,

Im was trying for a similar problem to choose a parameter to project status wise students or all students for student dataset. You used stories to show and hide parameter, but it wont show in the same page right? did you find any other way.

In this story i created,  Custom and Default.  Can i add third Caption box ?  

Hi Kavitha,  I didn't understand what you asked me exactly.  I used story to hide parameters.  Yes, it's not in same page.  It's from two separate dashboards.
Ohh! I got it.

My question was i want to choose batches or all students like you have to choose between custom and default dates.

Thanks.

Related Questions In Tableau

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
63 views
0 votes
1 answer

How can I use Tableau to create a heatmap?

Step 1: Create an Excel Spreadsheet with ...READ MORE

answered Apr 2, 2018 in Tableau by Atul
• 5,530 points
706 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How can I create a second sheet which is filtered to 8 days ago,

Following are the steps you can follow: Create ...READ MORE

answered Jul 11, 2018 in Tableau by Atul
• 5,530 points
54 views
0 votes
1 answer

How to create a single calculated field from multiple column filtering?

Try with this calculated field: ( ...READ MORE

answered Jul 6, 2018 in Tableau by Atul
• 5,530 points
50 views
0 votes
1 answer

How to get past N months date from data source?

Hi, this is a one solution to your ...READ MORE

answered Mar 1 in Tableau by Cherukuri
• 31,840 points
72 views
0 votes
1 answer

How to calculate work done for a given date or period of time?

Hi, Follow these steps: As per you question since ...READ MORE

answered Apr 1 in Tableau by Cherukuri
• 31,840 points
28 views
0 votes
3 answers
0 votes
1 answer

How to set Actions from sheet to Dashboards

Hey, The below Filter can be used to navigate from ...READ MORE

answered Feb 28 in Tableau by Cherukuri
• 31,840 points

edited Feb 28 by Cherukuri 40 views