As far as I know, there is no way for Tableau to color headers other than through banding. There is a workaround since Tableau will color measures, so one way to do this is to set up multiple axes using a value of 0 (one for each header) and then setting those axes to the Text mark type, with the Text equal to the appropriate dimension and the color being the category. Then we turn off Show Headers for the initial dimensions and just show the fake dimensions instead.
This method has the following drawbacks:
- Tableau uses the same horizontal size for all axes, so you're stuck with one size for everything.
- All dimension text is repeated for every instance of that dimension, which clogs up the view.
- There's no ability to left or right-justify the text, which makes it harder to read.
An alternative to this is to use a highlight table, so instead of just highlighting the measure values you are highlighting the background of the measures.
Considering the drawbacks you mentioned , can you please give the example of the alternative you suggested? One thing more, will the solution work if I have a hierarchy of category,subcategory, products and so on?
Plus can I use banding while having hierarchy? I have tried to use banding, but it needs to be adjusted for every hierarchy level.
See the attached for an example of a highlight table. You can set the color of the background to whatever dimension (or calculated dimension/measure/set) you want, so the calculation to identify the color can be as simple or complicated as necessary.
I'm not that familiar with banding, I do know that it repeats colors as it bands every N rows, so when you want to use banding colors to make more than two distinctions between members of the same dimension, banding won't work.
I have a similar issue where i am trying to highlight few rows in my data grid in tableau worksheet. could you pls help me out. I have attached the source sheet,tableau workbook and the report format i am trying to achieve.
I have tried to highlight the data using the field 'Code'. Here i am trying to highlight the codes with values 5 and 9 which have the header Variation and total respectively. The values against these headers are temporary. I will be creating dummy fields for these headers without values later on.
Kindly help me out in this. I would really appreciate it. Thank you.