1 of 1 people found this helpful
Here's my solution. I created a calculated field like this:
[Months since last viewed] +
IF [Exclude newly viewed workbooks] = "No" THEN 1 ELSE 0 END
I made it continuous and added it to the filter shelf with the condition that it had to evaluate to at least 1.
Create a calculated field with this formula:
if [Exclude newly viewed workbooks] = "Yes" and [Months since last viewed] = 0 then "Exclude" else "Show" end
Add this to your columns shelf (ahead of workbook name). This will split up the workbooks into two panes when you change your parameter to Yes.
Now right click on the Exclude label on your view and select Hide. Then you can clean up the header by right clicking on the FilterParam calculated field on your column shelf and deselect "Show Header".
This uses the hide feature of tableau instead of using a filter because the "months since last view" is a window function and wont add to your filter shelf. Has the same effect though. Note these hidden workbooks will be included in any totals or table calcs you do on the workbook aswell. Just for future reference.
I was able to add it to the filters in my example. The trick is that it has to be continuous instead of discrete.
I like your solution quite a bit too! Often, I would try to avoid hiding something as there is no visual indication within Tableau that something is hidden. At least with the filters shelf I can see that there is a filter in play. However, the decision on which way to go, in this case, would depend on whether or not those values should be included in totals and table calcs.
Wow, nice work guys!
I did both and they work. The underlying data both return is the same. Joshua's solution was the route I was attempting but the slick solution of Nathan's is, well, slick! So BOTH are the correct answer!
I chose Joshua's solution for my workbook is because it is like a coded solution and since I'm a programmer it makes more sense to me. Nathan's has the advantage that the header can be customized through the calculated field ("Exclude" and "Show" become pane headers when using his method) so that is why I marked it as the Correct Answer. It was really splitting hairs on choosing.