1 2 Previous Next 17 Replies Latest reply on Jun 15, 2017 8:57 AM by Jayson Osmars

# In YOY calculation to hide the first coulmn

Hi All,

I have calculated YOY change and here I want to hide the first year ,for this I used the calculated field "first()!=0". But this does not work If I use the grand total .

Please suggest If I have any other way to do this?

• ###### 1. Re: In YOY calculation to hide the first coulmn

Hi

Make calculated field

STR(LOOKUP(MAX(YEAR([Order Date])),0))

and drop to filter.

• ###### 2. Re: In YOY calculation to hide the first coulmn I just added another ZN to your YOY Change Formula to change Blanks to 0.

ZN((ZN(SUM([Sales])) - LOOKUP(ZN(SUM([Sales])), -1)) / ABS(LOOKUP(ZN(SUM([Sales])), -1)))

Hope it Helps!!!

Thanks

Deepak

• ###### 3. Re: In YOY calculation to hide the first coulmn

You can try this one in calculation and add this field in tableau

ZN((ZN(SUM([Sales])) - LOOKUP(ZN(SUM([Sales])), -1)) / ABS(LOOKUP(ZN(SUM([Sales])), -1)))

• ###### 4. Re: In YOY calculation to hide the first coulmn

But here I dont want to display 2009 data, I want to hide it by not using hide option

• ###### 5. Re: In YOY calculation to hide the first coulmn

Thank you Ram, But here I want to hide that first column , I can not use hide option as I may need that year in some other parameter selection

• ###### 6. Re: In YOY calculation to hide the first coulmn

Make calculated field

STR(LOOKUP(MAX(YEAR([Order Date])),0))

and drop to filter.

use this

• ###### 7. Re: In YOY calculation to hide the first coulmn

Thank you Nipun,But if I filter particular year it affects the table . I am using YOY calculation

• ###### 8. Re: In YOY calculation to hide the first coulmn

Then simply add year in filters and unselect the 2009 checkbox.

Thanks

Ram

• ###### 9. Re: In YOY calculation to hide the first coulmn

But I want to use 2009 data for YOY calculation , I have shared the workbook. Please look into it

• ###### 10. Re: In YOY calculation to hide the first coulmn

Hi

I think you should learned about the types of filters and its working

STR(LOOKUP(MAX(YEAR([Order Date])),0)) this is a table calculation and when you apply table calculation in filter it filter data after all the calculated fields are calculated

So when you drop this in filter your YOY field is already calculated before the filter applied and its just worked as hiding the field .

You will first try to use this then you will understand what I am saying.

Hope you would try this .

• ###### 11. Re: In YOY calculation to hide the first coulmn

thank you Deepak, But I want to hide that 2009 column , cant use hide option as next time I may need to hide other year using parameter .

I tried using Index in filter , that works but cant use grand total thr

• ###### 12. Re: In YOY calculation to hide the first coulmn

Hi sanganabasav,

The problem here is that you want

to filter out (hide) some marks

while leaving Totals on a view.

Table Calculation Filters couldn't help here.

You'd like to use a Dimension to "spot" the first Year --

I've been using a FIXED LOD expression for that --

then put this blue dimension pill on a view (in Columns)

and Hide the Header with the value (boolean True in my calc)

correspondent to the first Year. This will do the trick.

Yours,

Yuri

1 of 1 people found this helpful
• ###### 13. Re: In YOY calculation to hide the first coulmn

Thanks a lot Yuriy, this worked

• ###### 14. Re: In YOY calculation to hide the first coulmn

Hi.

I'm new to Tableau and have something similar.

I have  YoY [Sales] for 2016 and 2017 columns.

Then the [Sales Difference] and [Growth %] columns.

so the sales columns are populated for 2016 and 2017.  The Sales Difference and Growth % are null 2016 and populated for 2017.

I struggle to hide the null columns for the difference and growth% columns that doesn't also hide the 2016 sales column.

Any ideas to help me out?

Thanks a ton.  Great community with a LOT of helpful info!

1 2 Previous Next