2 Replies Latest reply on Nov 10, 2016 5:42 AM by Enrico Stancanelli

# How to works with different columns

Hi to everyone,

i would like to solve 3 problems:

how you can see i created a simple pivot table by using tableau, but i can't work with different columns!

My goal is to do the following:

1. In theory the "Costant trend R/G" should change the color of the entire row if it is < 0%, but this only works for 2014_2! How you can see 2013_2 is always Red! This is because the trend is based on 2014_2, but  I need to colour the entire row!
2. I would like to hide or erase the empty columns of 2013_2 for "Growth at costant/current rates". I tried to use this guide : Hiding Only the Blank Column when Using Difference Table Calculation | Tableau Software, but it doesn't work in my viz
3. "B/P PGrouped_Country" is a counter used to hide information in case the value of counter is < 3: in short i would that this works for each year because if 2014_2 is blind then automatically 2013_2 is blind as well!!!!

could you help me?

• ###### 1. Re: How to works with different columns

Hello Enrico Stancanelli  for 1 -  change the formula to:

if window_avg([Growth at Costant rates]) > 0 then "Positive"

ELSE

"Negative"

END

This way the table calc can go across based on the value of that field for the row.  this will fix the green/red issue for the row.

For 2 - we can't remove the column in this view.  We could change the nulls to zero or you could do something like what Jim Wahl did in his reply here: HIde an empty column  to combine both the data for the year and the change percent into a single field.

I'm not following the third question related to blind/public portion of the question so maybe someone else can help or you can expand on that one?

I hope that helps.

Patrick

• ###### 2. Re: How to works with different columns

Hi Patrick!

thanks for you help, the first formula is great ! for the second question i realize that this is impossibile, like a pivot tableau on excel. For the third i decided to work on excel before to import my dataset on tableau, resolving my problem!

thank you very much!