-
1. Re: Conditional color based on color result of first column
Nicole Le Prohn Jan 19, 2018 1:24 PM (in response to Tam Nguyen) -
2. Re: Conditional color based on color result of first column
Joe OppeltJan 19, 2018 1:27 PM (in response to Tam Nguyen)
In the attached I changed your COLOR calc to look only at 2013. Then there is an ELSE section that says PREVIOUS_VALUE
That calc is a table calc that says to grab the value from the previous cell.
When that goes onto the sheet, tableau defaults to looking at TABLE(across), which in your case is exactly what you want. 2014 looks at 2013. 2015 looks at 2014, which had grabbed its value from 2013. Etc.
-
3. Re: Conditional color based on color result of first column
Joe OppeltJan 19, 2018 1:28 PM (in response to Joe Oppelt)
... and Nicole beat me to it.
Powerful table_calc function, PREVIOUS_VALUE!
Store it in your bag of tricks.
-
4. Re: Conditional color based on color result of first column
Nicole Le Prohn Jan 19, 2018 1:33 PM (in response to Joe Oppelt)...although yours was more elegant, Joe!
-
5. Re: Conditional color based on color result of first column
Joe OppeltJan 19, 2018 1:39 PM (in response to Nicole Le Prohn)
"Elegance" is all behinds the scenes. Whether you plant the string beans in this-corner of the garden, or that-corner, in the end you get to harvest string beans.
The key was planting string beans (or PREVIOUS_VALUE).
This also could have been done with LODs, and thereby no table calc (or PREVIOUS_VALUE) would be necessary. But in this case I found PREVIOUS_VALUE to be easier. Someone else might come along and say that LODs would be easier.Cool thing, Tableau. Lots of ways to get from here-to-there.
-
6. Re: Conditional color based on color result of first column
Tam Nguyen Jan 19, 2018 3:44 PM (in response to Tam Nguyen)Thank you Nicole and Joe for your useful and elegant solution!