5 Replies Latest reply on Oct 23, 2013 8:51 AM by Jonathan Drummey

# YoY Variance using sets

Good Morning All,

I've done a search on the forum and haven't quite found an answer.  I created a Set using one of my dimension fields Sales Origin.  Sales origin has four values.  Using that set along with one of my measures Impressions I created a new measure called Sell-Through Rate.  Which is the percentage of two of the four values to the total is the sell-through rate.  After creating the set from the  2 values from Sales Origin I dropped it on the sheet as a column and then I dropped impressions as the measure.  I hid what is not included or "out" of the set and converted the impression value into a percentage.  Leaving me with my Sell Through Rate.

If I filter my data on two dates which this the current month and year and the previous year and month and drop them in the column my calculation breaks.  I would like to add the previous years Sell Through Rate and then also add a calculation to show the YoY variance.  Is there any way to do this?

My data is proprietary so I may not be able to post the exact sheet that I am working on I may be able to send some dummy data in order to illustrate exactly what I am trying to do upon request.  Any direction on this is very much appreciated.   Thanks in advance..

UPDATE:

Hello All,

I have spent most of the day getting my calculation to work.  I just would like to be able to calculate the difference between the 2 years and add it to a third column.  Any advice?..

....

• ###### 2. Re: YoY Variance using sets

Michael Boateng wrote: I just would like to be able to calculate the difference between the 2 years and add it to a third column.  Any advice?..

Advice? Post a packaged workbook with some sample data and we can show you how to do this.

--Shawn

• ###### 3. Re: YoY Variance using sets

Hi Shawn,

I've attached a file in the original post.  Thanks in advance for all of you help..

• ###### 4. Re: YoY Variance using sets

Hi Michael,

See the attached. I converted the quick table calc for the % of Total into an calculated field, so I could create a nested table calculation for the YoY variance. This nested calculation has a Compute Using of the Month while the inner % of Total still has the Compute Using on the STR set.

Unfortunately, because of how Tableau generates headers there's no easy way to get rid of the extra column for the 2012 YoY variance. One thing you might consider instead of using the values is to use a heatmap.

Jonathan

• ###### 5. Re: YoY Variance using sets

Jonathan thank you!..  This is PERFECT!!!

• ###### 6. Re: YoY Variance using sets

You're welcome!