2 Replies Latest reply on Jul 31, 2017 9:27 AM by AJ.Yusuf

    DATE Correction

    AJ.Yusuf

      Hi Tableau Wizards,

       

      I have a problem I need to match the current year to date data to last years. I have datetrunc my data by only viewing the data of the current month when the next month starts therefore getting a overview of it but i need to do that for the year

       

      Current view

       

      Disired View

       

       

      So it matches the current to last

       

      Any Ideas

        • 1. Re: DATE Correction
          Ben Neville

          Hi Junaid - this one is pretty easy if you utilize the TODAY function. I'm assuming you only have data for completed months. In that instance, you wouldn't need to include this month, and you'd just need a calculated field. The logic would look something like below:

          MONTH([Generated Date]) < MONTH(TODAY())

           

          Just take this field and place it on your filters shelf, keeping TRUE values. The beauty is that this should dynamically work for every new month without you having to change any logic, as well as being a boolean calculation so it should be fairly performant.

          • 2. Re: DATE Correction
            AJ.Yusuf

            THANKS