If you create a parameter as Date, you can get the Calendar Picker.
And for your filter. I have created a sample. PFA.
You need to write a calculated field like below and make the Filter to show "True" only.
Hope this helps.
if [Filter] = "Month" then
if datetrunc('month',[Date]) = datetrunc('month',[Date Parameter])
DATEPART('day',[Date]) <= datepart('day',[Date Parameter])
ELSEIF [Filter] = "Day" then
if datetrunc('day',[Date]) = datetrunc('day',[Date Parameter])
ELSEIF [Filter] = "Week" then
if datetrunc('week',[Date]) = datetrunc('week',[Date Parameter])
you say that:
if [Filter] = "Month",
i want to ask what is filter here,is it column or i need to create new column with day,week and month values.
Thanks for the help.
[Filter] is a String Parameter here. Just create parameter with Values - Month, Day, Week.
Sorry for missing it out on my reply.
can u plzz help me from start as i am new in tableau,you specify three condition in upper logic you provided that:
if [Filter1] = "Month"
ELSEIF [Filter2] = "Day"
ELSEIF [Filter3] = "Week",
so in all three filters from start which string parameter i have to pass in filter 1,2 and 3.
you already said that filter is a string parameter here
1 of 1 people found this helpful
Step 1: Create Parameters
Step 2: Name it Filter or according to your needs and Enter like the below.
Another New Parameter
Step 3 : Create Calculated Field
Step 4: Enter the Formula and name it
Step 5: Drag the Date Filter Calculated Field to Filters
Step 6: Exclude Null on the filters like the below.
Step 7: Show Paramter Control for
Step 8: on the Right side, you will see the parameter Control like this, Clicking on the Date Parameter, will give u the Calendar Picker and the Filter Drop down can help you to Choose whether Day needs to be shown or the Month or Week.
Please see to the attached Workbook too. Hope this helps.
there is no workbook attached in it...plz attach it.
Thanks in advance
The workbook is attached. I guess you are checking the thread from Inbox and replying from there. Please open the thread Create calendar picker as quick filter? .
Where you can see the attached workbook at the bottom of my last post.
Let me know if you are still facing any issues.
it is working absolutely fine...thank you so very much for your help.
If possible can u plzz provide a report made on health-care data in tableau,and will be thankful to you if you also provide the data in excel.
Sorry,I do not have them but the below link will be useful for u.
Click on any example , download it and open on the Tableau Desktop.
You can use the "view data" option to see the underlying data.
Please mark this question as answered.
Very Nicely explained Raza .
Its helped me also ... A BIG thanks to brother .