4 Replies Latest reply on Sep 8, 2016 2:42 PM by Paula Garzon

    How To Filter data on the data source to bring only the last 5 years of data?

    Paula Garzon

      Hi community!


      I have a table in Tableau that shows sales data from 2008 to 2016 (current year). I want to put a condition somewhere (and this is the part where I don't know how or where to put it) to always bring the last 5 years of data.

      For example, if today's year is 2016 the Year field will bring 2012,2013, 2014,2015 and 2016. Next year, I want dynamically to show 2013,2014,2015,2016,2017.  This way the end-user will always have the latest 5 years on their Year filter.

      So basically I want to show data where Year<=(Year(today())-5.


      Could you please help me out with a solution?


      Thank you!