How to Display YoY for only the Most Recent Year in Tableau

Tableau has been growing rapidly with an amazing flurry of functionalities over the last few years. The use cases and business benefits has been felt in segments of every industry with it's growing rate of adoption. With data being generated at a pace like never before, analytics is increasingly coming to prominence. One of the common metrics that we have in analyzing performances is comparing the latest year figures with the previous year. Tableau provides the ability to do this but sometimes it is not able to cater to our exact specific requirements to show or hide fields as required.

We are aware of the challenges which comes with creating a generic Year over Year field in Tableau, we cannot hide it or display it for a specific year or years without affecting other fields in the view. Say I want to display the YoY for only the recent year and I also have other Sales values in my view, if I hide the YoY calculated field for previous years it will also hide the Sales values for the previous years. But I want all my Sales values, and only the latest YoY value for recent year. This can be achieved in Tableau with a few workarounds, as below. This adds one activity every year, to add a new field and update the view to include this new field for new year. Here, using the Sample Superstore dataset, we are viewing the Sales data for all years, and YoY for only 2013.