Do I understand you correctly - you want to color the entire column one color, not individual cells? Or is it that you want some columns with shading and some not. If you want the entire column one color, what will this be based on - average?
Perhaps if you mocked up what you want that would help.
5 of 5 people found this helpful
As far as I've been able to learn, Tableau has no way to allow for custom formatting of values in Measure Names/Measure Values except when there's a higher-level dimension that you could put a calculation on. However, there is a workaround by creating a custom field, dragging that multiple times onto the Columns shelf, and using multiple mark types (Text for text fields, Bar when you want a highlight table) with the Label/Text being the specific column value and the Color being whatever calculated field.
I've attached a workbook that goes through all the options I've been able to learn about so far, with instructions and references.
Based on this forum question http://community.tableau.com/thread/116347 I added details on how to set up alternating text (not background colors or banding) for rows, and along the way added some additional worksheets showing alternatives coming from other forum posts. I also figured out how to get an axis title on the top of each column instead of the bottom, using a dual axis for each measure with one axis being an empty measure and the second axis showing the values.
-- Added 5/18/12
Last night I presented an updated version of the workbook at the Boston Tableau Users Group meeting, it's on Tableau Public at http://public.tableausoftware.com/views/conditionalformattingv4/Introduction. The instructions are more complete, and there are a couple of new tricks with regards to getting Excel-like conditional formatting where some text in a column is red and other text not. Based on this, I'm removing the color and highlight columns workbook that I'd originally had here, please use the Tableau Public version for your needs.
Thanks very much Jonathan. Very useful.
Jonathan - there is one cosmetic thing i want to fix. I am trying to conditional format the text (like in the first 3 of your columns) but I want the column headers to appear on top instead of the bottom.
I tried a few ways but it did not work. Can you help with that please? Other than that, your method of conditional formatting works well. Thanks for that.
Great job Jonathan! Excellent resource. Thanks,
Sorry, I haven't been able to find a way to do that. I put a note about that in the caption in the workbook under "Issues." Tableau wants to leave the top header open to discrete values that would create headers, apparently.
No worries. Your workbook was very useful.
Is there a way to add a table in a worksheet so I can workaround by creating the field names in a table and placing it above the conditionally formatted sheet.
The only thing I can think of would be to duplicate your worksheet to create another instance of your table and align it on a dashboard above the sheet. You could turn off the top headers of the "fake header" worksheet and resize & change colors so the effect is minimized. You'd still probably end up with some white space that would be hard to get rid of.
Firstly - Thanks to Jonathan for his examples they have worked a treat for what I was trying to view - and best of all I could understand the techniques that were used.
I have limited experience of tableau and dont fully undestand a lot of the calculations yet. I have completed some exaples that got close to what I wanted from the attached but never quite achieved it - that was when I was using normalised data and doing the calcs in tableau.
After seeing this post I decided to shape the data wholly in Access from data that was pulled from SQL Database - something that I understand and feel comfortable with.
A few questions if I may - I can't seem to right justify the numeric fields.
With the AGG Quick Menus - rather than just highlighting the selected data is it possible to have a quick menu that only show the selected Color or Colors?
As I am not doing any Calculation with the numbers - am I correct in using the Measures (AGG, AVG and SUM).
Without creating a Double Axis - is it possible to have a Header on the Columns A* - G.
I updated the "color and highlight columns.twbx" file with a workaround for getting axis titles on top, it works much better than trying to place two worksheets on a dashboard.
Chris - You can create a parameter that would then used in the calculated field that determines the color for a given column. When the user changes the value of the parameter, the color would automatically change.
And for adding the 2nd header, you might be able to do something like what is referenced here: http://community.tableau.com/thread/114734#comment-43090. If not, you'd need a dual axis.
Thanks very much for the link I will check it out.
I really appreciate your time.