4 Replies Latest reply on Nov 11, 2019 3:21 PM by Andrew Phares

    "Shape" Handling of Table Calculation Different From "Line"?

    Andrew Phares

      Hi all,


      I have a rather peculiar issue I could use some help with. In the attached workbook, I have added date alignment labels to dates and using those to plot a time series of sales from the superstore sample dataset. I also added to the sample dataset by adding a 2020 "forecast". The alignment labels are things such as "thanksgiving+0", "cybermonday+1", etc so that dates are aligned by their proximity to holidays throughout November and December.


      I am using a table calculation to calculate the year-over-year growth of sales. Using these date alignment labels, I would expect 2019 and 2020 to show null values for the labels in the range of "cybermonday+13" to "cybermonday+18". This is because starting in 2019, Thanksgiving jumped a week later and thus there are fewer days between Thanksgiving and Christmas than in 2018, 2017, etc.


      What I'm seeing is that the line graph is showing this perfectly. There are no values showing for "cybermonday+13" to "cybermonday+18". However, if you look at the "shapes" in the lower pane, there is a value showing for 2020 "cybermonday+13" and "cybermonday+14". The shapes are calculating this value by taking 2020 and comparing to 2018. This is wrong, this should be comparing to 2019 and returning null.


      I find it very strange, that when you look at the cross tab text table view, the year over year table calculation shows null for 2020 on "cybermonday+13" to "cybermonday+18" but when showing on a graph with shapes, 2 phantom data points show up.


      Any ideas on why this is happening? The lookup function seems to be working differently in viewing as "line" than when viewing as "shape"



      (If you're wondering why I need to use shapes at all, I like to use a dual axis of lines/shapes so that I can get dotted lines, in the example I attached, I separated them out onto multiple axes)




      Tableau Desktop 2018.3.7