One way this could be done would be with Menu action filters. There would be two different worksheets, but depending which menu action the user chose would determine which view they saw.
Hope this helps!
1 of 1 people found this helpful
Hey Ian, try this mate. I did the same thing the other day and it works great.
Seems like a lot of work for this functionality but maybe Tableau will see us doing this and make it easier in the future.
You'd create a Semester worksheet and a Year worksheet, etc., for my dashboard I use: Variant, Standard Deviation and Difference from Previous sheets that I selectively hide or show based on a parameter dropdown box. I do it to save dashboard space.
I do this in a different way. (I think there is a KB article on this as well...)
1) Create a parameter called something like "Date View." For the parameter settings, make the values be a "String" and have the values be "list" For the list values put "Date" and "Semester."
(I'm assuming you already have a dimension column or calculated dimension column for Date [DateCol] and Semester [SemesterCol]).
2) Create a cal field with a title like "Report Date." Use this function for your calc.
case [Date View]
when 'Date' then [DateCol]
when 'Semester' then [SemesterCol]
3) When building your report, right click the parameter in the parameter shelf to "Show parameter control."
Depending on how you are building your report, reference your new calc column "Report Date." By changing the parameter value from Date to Semester your report will automatically switch between the DateCol and the SemesterCol.
This gave me the exact functionality I wanted, without having to create extra sheets. Thanks!
In fact, I use this functionality a lot. Tableau Desktop automatically builds date hierarchies, but it's difficult to get the functionality you want when you are interacting with a report through Tableau Server or in a dashboard.
One piece of functionality I recycle a lot in my workbooks is this:
Create a parameter called "Date Delimiter" (or something that makes sense for your users).
In the list of values I usually have
I then create a Calculated Field on my Date dimension that reads like this:
case [Date Delimiter]
when 'Year' then datetrunc('year',[Date])
when 'Month' then datetrunc('month',[Date])
when 'Week' then datetrunc('week',[Date])
when 'Day' then datetrunc('day',[Date])
It works perfectly and gives users a easy way to roll-up measures (across multiple worksheets if in a dashboard) by the date values they need.