3 Replies Latest reply on Aug 27, 2012 3:00 PM by Christopher Turner

    YoY with Date Relative Filters

    Christopher Turner

      I am trying to create a YoY calculation that will work with a relative date filter. I would like to add the calculation to the level of Detail area so it would be present when hoovering over the row.


      I've tried  multiple calculations, but I was never able to get the formula right. Do you guys have any suggestions.

        • 1. Re: YoY with Date Relative Filters
          Jonathan Drummey



          Do you want to show the YoY growth, % change, or something else?


          The date filter will likely have to be based on parameters and table calculations and not the actual date dimension. This is because "normal" filters on the the dimension are applied inside the data source, so that data is not available to Tableau to do the YoY, whereas table calc filters are applied after the data has been returned to Tableau.


          If you could post a packaged workbook (.twbx) with some sample data, that would be helpful.



          • 2. Re: YoY with Date Relative Filters
            Joe Mako

            Christopher, there are many routes to get to the result you have described.


            My first thought is that you have gotten the calculation to geive the expected results when there is no date filter, but breaks when you apply a filter.


            If that is so, then one possible solution is to case the filter to evaluate after the computation of YoY, and that is done with a calc field like:




            and set to be continious (from the field's right-click context menu) before placing on the Filter shelf, to enable the relative date filter.


            A filter on this table calc will be applied after all table calcs have been evaluated.


            If this does not help or apply to your situation, then you will need to provide a packaged workbook .twbx

            1 of 1 people found this helpful
            • 3. Re: YoY with Date Relative Filters
              Christopher Turner

              It was the data parameters, once I corrected that, I was able to properly compute the YoY%. Thanks for your help