
1. Re: "Shape" Handling of Table Calculation Different From "Line"?
Jennifer VonHagel Nov 8, 2019 12:52 PM (in response to Andrew Phares)Hi Andrew,
This is so interesting that Tableau is making different assumptions based on mark type. I hope a Tableau rep will chime in.
I was interested to find for one of these cases that if I show the crosstab in more of a table form, where the table calc will compute the YoY Change "at the lowest level, restarting every DayAlign", we can see that it does compute the % change from 2018. Which makes more sense to me than what the line chart is doing, actually. The table calculation would be operating on the previous row's year that is actually in the data set and available to the table calculation rather than the absolute prior calendar year. Maybe a line chart is smart enough to know that time series is being trended and to look for the last calendar year while the shape chart won't make that assumption?
I don't know. But, you can explicitly handle this: Modify your calculation to explicitly return null if the prior year in the data is not one actual calendar year prior, so something like:
IF LOOKUP(MAX([year]),1) = MAX([year])  1
THEN (sum([Sales])  lookup(sum([Sales]),1)) / abs(lookup(sum([Sales]),1))
END
Best,
Jennifer

2. Re: "Shape" Handling of Table Calculation Different From "Line"?
Matt Lutton Nov 8, 2019 2:48 PM (in response to Jennifer VonHagel)Table Calcs do sometimes produce odd values based on the mark type  see also: https://www.thedataschool.co.uk/damianaspadafora/datadensificationdemystified/
https://www.kenflerlage.com/2019/05/introtodatadensification.html

3. Re: "Shape" Handling of Table Calculation Different From "Line"?
Jennifer VonHagel Nov 9, 2019 5:45 AM (in response to Matt Lutton)Thanks, Matt. I'll check that out.

4. Re: "Shape" Handling of Table Calculation Different From "Line"?
Andrew Phares Nov 11, 2019 3:21 PM (in response to Jennifer VonHagel)Thank you Jennifer! The explicit handling makes sense.