-
1. Re: Date Dimension to filter perivous 2year and latest month.
Tracy RodgersOct 9, 2012 11:34 AM (in response to Bhujang Hundre)
Hi Bhujang,
By creating a calculated field similar to the following will allow you to see 2 years ago data relative to today:
if [Order Date]>=DATEADD('year', -2, today()) and [Order Date]<=today()
then [Order Date] end
Then, place this calculation on the filter shelf and filter out NULL.
Hope this helps!
-Tracy
-
2. Re: Date Dimension to filter perivous 2year and latest month.
Bhujang Hundre Oct 10, 2012 6:11 AM (in response to Tracy Rodgers)Hi Tracy
Thanks for your quick response.
It is partly fulfilling my my doubt in date calculation.
it is show me pervious two year but not the latest month of current year.
Why I need this is when the new data is refreshed in Tableau it should automatically show the pervious 2year and current year latest month
Regards
Bhujang
-
3. Re: Date Dimension to filter perivous 2year and latest month.
Tracy RodgersOct 10, 2012 8:43 AM (in response to Bhujang Hundre)
Hi Bhujang,
What is the desired result? Do you want to show the entire month of October (today's date) or just the date and two years prior to the exact date?
If it's the latter, then the calculation can be changed to the following:
if [Order Date]>=DATEADD('month', -12, today()) and [Order Date]<=today() then [Order Date] end
-Tracy
-
4. Re: Date Dimension to filter perivous 2year and latest month.
Bhujang Hundre Oct 10, 2012 8:54 PM (in response to Tracy Rodgers)Hi Tracy,
The desired result what I am looking for is pervious 2year
i.e. 2010,2011, and the completed latest month available in database.
Regards
Bhujang.
-
5. Re: Date Dimension to filter perivous 2year and latest month.
Bhujang Hundre Oct 15, 2012 2:44 AM (in response to Tracy Rodgers)Hi Tracy,
please help me out in this regards, find the attached work book for what result i am looking for
I know its simple but I am not able to solve it.
Thanks in Advance
Regards
Bhujang
-
Example1.twbx.zip 388.5 KB
-