0
votes

I use Tableau to do some report and my data source is excel live. I have an excel file that contains each selling records and it looks like this. the last two columns are year over year growth.

Please see picture1

I want to hide the column highlighted in blue: Please see picture2 , without hiding any other column. Right now whenever I hide the highlighted column, the first column "2014 amount" also hides, but I want 2014 amount to display.

I know if I have quarters and months, there's a function to make the columns independent by combine year and quarter/month, but I only want the year. I know I can do it in two separated worksheet and put them together in one dashboard but I need to put them in one worksheet.

I tried to create a calculation field to calculate year 2015 year over year growth only, but I am not sure how to write the syntax. The logic would be:

Dim a,b,c, a = 2014 amount, b = 2015 amount, c = b/a-1

But I am not sure how to use tableau to do things like this.

1

1 Answers

0
votes

You will have to remove the YEAR(Date) Dimension, and create 3 measures: one for 2014 sales, one for 2015 sales, and one with the delta. Otherwise, what you are trying to do will not work.

Thankfully, this is easy enough to do.

Create a measure for 2014 sales

SUM(CASE YEAR(DATE) WHEN 2014 THEN [Amount] ELSE 0 END)

Then a measure for 2015 sales

SUM(CASE YEAR(DATE) WHEN 2015 THEN [Amount] ELSE 0 END)

Then a delta measure

([2015 Amount] - [2014 Amount]) / [2014 Amount]

Then go ahead and drag them into your visual. Here's the result

enter image description here