2 Replies Latest reply on Oct 22, 2018 11:14 AM by Daniel Lawrence

    Visual Tooltip for YoY Trend when Month and Year for Filter

    Lindon Belshe

      Hi. I'm running into a problem where the filter I use (and need to use) has both the month and year but I want to have a tooltip that allows for a year over year trend to show up. Basically, if a user filters for January 2018, I want them to see the YoY trend for January 2017 versus January 2018, but if they chose January 2017 (if they data existed), it would show January 2016 and January 2017. Since the filter is restricting my data to only the selected month, my question is how can I limit the tooltip to only show the month selected and the year prior. The attached is an example, where the tooltip on the dashboard would only show one (versus all) month.

        • 1. Re: Visual Tooltip for YoY Trend when Month and Year for Filter
          Ken Flerlage

          I'm sorry, but I'm having trouble understanding the dilemma here. Which chart do you wish to be the source for the tooltip? And are you wanting the tooltip to be text or are you intending to use viz-in-tooltip?

          • 2. Re: Visual Tooltip for YoY Trend when Month and Year for Filter
            Daniel Lawrence

            Following up on OP original post, I have a very similar problem that I am having trouble solving. 


            I have data going back until 2014 and I want to filter the viewable data on a line chart of revenue to 1/1/2017.  In the Tooltip, I want to be able to see the previous year's revenue for that week or Same Week Last Year (SWLY).  I currently have it working well with LOOKUP(SUM([Revenue]), -52) but that requires all the data to be in the viewable date range.  Here is a screenshot of it working perfectly on current data with the previous year in frame (data from 1/1/2017 until current by filter):


            Tableau Tooltip with YOY.png


            As you move along the axis, to an early time period the SWLY data is no longer present due to the date filter starting at 1/1/2017.  As I mentioned earlier, I have data back to 2014 which would include all of 2016, so this needs to be populated but the date filter is disallowing it.  Screenshot evidence of the date filter being the problem:

            Tableau Tooltip with YOY2.png


            Because a FIXED Level of Detail expression operates above a dimension or measure filter, I would like to have a FIXED LOD calculation providing text in my tooltip.  The lookup function REQUIRES all necessary dates to be in the field and I would like to be able to have this calculation display SWLY regardless of if the necessary dates are in the field.


            It seems like this should be a simple FIXED LOD expression but I cannot seem to get the correct construction.  {FIXED ([Date] - 365): SUM(Revenue) } is not working.  I assume this is because I want ([Date] - 365) to change as the week is selected in the graph.


            What am I missing?

            Thank you for any and all ideas!