For starters, create this calc:
LOOKUP( ATTR(YEAR([Date Detected])),0)
Put that on your filter shelf, and just select 2017. You'll see that your numbers for 2017 are still correct, but 2016 is gone from the sheet.
This is because a table calc as a filter does not eliminate actual rows from the underlying table. it just controls what gets displayed.
Now, you can create some slick things to determine what year(s) to display based on how your data is laid out and what you actually want to show. But for starters I want you to see how the table calc filter helps you here.
For the record, this will take 2016 off the [Amount] column too. Tableau is dimensionally oriented. Take out a piece of the dimension, and it impacts every place that piece would have been displayed. Is that going to be a problem?
The workaround listed above won't work for me in this case. I need the 2016 column to display under "Amounts" but NOT under "Variance". Currently I have "Amount" and "YOY Variance" on two separate worksheets and place them side by side on the dashboard. There may be no other way to achieve this, but I wanted to check with the forum just in case.
Thanks a lot for your assistance on this.
Then you will need to make two separate sheets. One will show AMOUNTS and one will show VARIANCE. Format them appropriately, and display them side by side on a dashboard so that they look like one sheet to the user.
Thanks Joe. I did not find the solution I'd hoped for, but at least I know what I am doing now is the best available workaround. If Tableau could allow the user to hide a column on the dashboard (without removing it from the worksheet), that would be a great enhancement.
There is a technical limitation here. What you want to do is not hiding a column per se, in the Tableau world. Again, tableau is dimensionally driven. To hide a column in a dimensional world is to hide 2016, all-or-nothing.
Making the second sheet is not difficult. If you could share a sample workbook with the sheet you currently have, I can show you what to do.