Back in May of this year before I started this blog, I did a presentation at the Boston Tableau User Group on conditional formatting in Tableau. Prior to using Tableau, I’d created some dashboards and reports in Excel, and when I tried to re-create them in Tableau I ran into a number of different issues in terms of doing the kinds of formatting, layout, and conditional formatting that are possible in Excel. I created a workbook with every technique I could find and some I figured out. Here are links to:
- Conditional formatting workbook – I made extensive use of captions for instructions, and unfortunately Tableau Public makes the captions take up the space for display of the view, so it’s better to download the workbook. Here’s the Crosstab of Many Colors, but first, a disclaimer: This view is for demonstration purposes only, if I ever built a crosstab that looked like this for actual use then the trinity of Edward Tufte, Stephen Few, and Naomi Robbins would banish me to using Notepad forevermore.
- And the Applied Zen in Tableau (Conditional Formatting) presentation:
Here are some related feature requests from the Ideas section of the Tableau forums, if these were implemented then many or all of the workarounds wouldn’t be necessary:
- Multiple in ‘cell’ charts on one dashboard row – http://community.tableausoftware.com/ideas/1181
- Conditional Formatting of Measure Names/Measure Values – http://community.tableausoftware.com/ideas/1071
- Text Shelf – Display multiple fields with EASY formatting – http://community.tableausoftware.com/ideas/1061
- Totals and subtotals over displayed marks – http://community.tableausoftware.com/ideas/1232
- Continuous (angled) refernce lines and bands – http://community.tableausoftware.com/ideas/1203
- User Defined Functions – http://community.tableausoftware.com/ideas/1130
- Two Marks Shelves for Dual-Axis Charts – http://community.tableausoftware.com/ideas/1087
- Additional date time number formats – http://community.tableausoftware.com/ideas/1054
- Simple Textual Formatting Abilities – http://community.tableausoftware.com/ideas/1095
- Different columns width – http://community.tableausoftware.com/ideas/1362
This is wonderful. I’m using this workbook to construct a dashboard of my own, with a very similar construct. Thanks for sharing!
Jonathan, I’ve been trying to get a solution to a conditional formatting query. Any help is greatly appreciated. I have posted it in a community here along with a .twbx. http://community.tableausoftware.com/message/226796#226796
Hi Anuja, I replied to your post on the forums, hope it helps!
Pingback: KPIs and Floating Dashboards | Drawing with Numbers
Pingback: Measure Names on the Color Shelf: Tableau v8 Enhancements | Drawing with Numbers
Great post. I worked through most of the solutions and learned a lot. Do you have any similar solutions where the metrics are rows and not columns
Thanks
Dave
Hi Dave,
All you need to do is swap the pills on Rows and Columns, or am I misunderstanding something?
Pingback: More Tableau Tips (Keep Updating) – Data & Web
Hey Jonathan,
I am toying with the idea of using a multiple axis crosstab for a project I’m working on, but I am unable to get the sort button to work with these tables. I had the same issue sorting when I downloaded your Conditional Formatting workbook. Is this a known issue with these tables (I didn’t see this in the “Issues” section of the caption, so I thought I’d ask. If so, do you know a way around the issue?
Thanks,
Ryan
Hi Ryan,
Which sort button are you referring to? Tableau’s one-click sort? If that’s the case then the reason why has to do with how Tableau sorts, see http://datablick.com/2016/10/03/tableau-padawan-faster-nested-sorts/ (another post of mine) for more info.
Hi Jonathan,
Yes I was referring to the one-click sort button that shows up in the column headers. So in the case of the multiple axis crosstab I am creating a new marks card each time that I add my calculated field containing a zero to the column shelf. I then proceed to drag a measure onto text in that marks card, this ascetically accomplishes what I need, but then I need to be able to sort the table by the values of this measure. Tableau provides a one-click sort button but it doesn’t work. I’m wondering if this is expected and if there’s a way to get around it. I’m not sure if there is overlap based on the post you provided above as that specific case has discrete dimensions in the rows vs. my case of having a single discrete dimension on the row shelf and a bunch of continuous measures in the various marks cards.
Thanks, very much appreciated.
Ryan
Ok, I get it now, it’s been awhile since I built one of these so I’d forgotten about this particular limitation of the multiple-axis crosstab: The 0.0, etc. measures are what are creating the Marks Cards as you noted *and* when we click on the one-click sort Tableau is using the 0.0 measures to do the sorting, *not* the measures that are on the Label, Color, Size, and/or Shape Shelves. The workaround is to create a parameter with a list of values (one for each measure you want to sort by) and then a “sort measure” using a CASE statement that returns the appropriate measure, then sort the dimension by the “sort measure” calculated field and show the parameter control.
Jonathan
Okay, that makes sense. My only question is if we sort the dimension by the selected measure from the parameter, will the rest of the measure “columns” (that appear on different marks cards) sort as with it?
Thanks,
Ryan
Hi Jonathan. I, very sadly, must make use of the cross tab of many colors concept. Is there any way to do this while including the functionality of allowing the user to choose which columns to see?
With Measure Names you can, of course, display the filter and the user can pick and choose which things to see. I’m hoping to build in similar functionality here.
Thanks,
Sam
Hi Sam, this method won’t work with users picking columns. The workaround is to pivot/transpose the data into a “very tall” structure with a record for each measure, that will also give you a dimension to use for filtering and then instead of having lots of green pills on Columns you can use the dimension instead. This does require extra calculations to get all the colors & shapes to work out right. An alternative to the pivot/transpose is to create a “scaffold” source that has a record for each measure & whatever dimensions you’d want to use on Rows and then use data blending.
Thanks, Jonathan. I’ll play around with the source data to format it this way to see if I can figure out how to get it done. But that will have to be Phase 2 of the project. For now, having a measure filter is more important than the formatting so I’ll use Measure Names.
Having met Stephen Few .. I think it’s safe to say that he’d have you burned at the stake!?!
This was really useful though, so thanks ?
Hi Jonathan,
Can you please help me with this.
https://community.tableau.com/thread/343155
Thanks
Hi,
I replied on the site. Cheers!