This one was fairly easy. I'd give it a 2. (But there's always a little doubt in the back of my mind that there might be an even easier way!)
Thanks for these.
I'd give this one a 2 also...though again will be interested to see your final solution to see if it's any easier than mine (and possibly more dynamic!)
Give it 2.8 ;-)
I'm curious about the very vivid colors of yours (mine being pale).
I guess I'm not as sharp as the rest of you. I give it a 4. It really had me stumped, and I cheated. The solution was easier than the path I was going down.
These are fun! I give this one a 2.5.
It had me stumped at first.
This was fun. I'll give it a 3. Thank you for doing this.
I give it 5 (I had to cheat ), and this means that I have to work on my Tableau skills to figure such a solution out ..
Thanks Jonathan for the brain teaser..
Had across to similar requests before, fairly easy. I'll go with 1.9
Thanks for teasing every Tableau Geeks.
Use dual-axes. Tableau only lets us have a single box plot reference line for each axis (the axis being generated by a continuous pill on Rows or Columns) with a single color scheme for that box plot, so to get multiple different colors for the box plots we use multiple axes and then join them in a multiple axis. In order to prevent values being duplicated on each axis, I created a measure for each box plot using a record level calc like SUM(IF [Department] == "Furniture" THEN SUM([Sales]) END) and used those in a dual-axis chart:
The box plot colors were created using Tableau's box plot colors:
And then I chose a color palette for the marks to reflect the available box plot colors.
There are at least a few of other potential solutions to this:
1) Create a worksheet for each distinct discrete value then put them all in a dashboard, turning off Show Headers for the Y axis for all but the left-most worksheet.
2) Build 5 calculations for each distinct discrete value (whisker ends, 25/50/75th %iles) that only return non-Null values for that discrete, then put them all on the LOD and build reference bands & lines using the BYO pre-8.0 box plot technique.
3) Add 20 records to the data source for each distinct discrete value and then use those marks to draw the box plots as polygons on a dual axis. Given some work in the data source to automatically add those records and a ton of calculations, this is the only solution that I can think of that would be able to draw an arbitrary number of individually colored box plots.
Thanks for participating!
colored box plots end.twbx 1,009.1 KB
I think I've come up with a solution that works to do distinct colors for any number of box plots.
1) Add the regular grey box plots from the reference lines
2) Create the following calculations to find your Upper and Lower Quartiles
Upper Quartile: WINDOW_PERCENTILE(SUM([Sales]), .75)
Lower Quartile: WINDOW_PERCENTILE(SUM([Sales]), .25)
3) Create a third calculation, Distance Between Quartiles
[Upper Quartile]-[Lower Quartile]
4) Bring the Lower Quartile calculation onto the Rows Shelf. Set Mark type to Gantt Bar. Set the secondary axis to
using Dual-Axis, and synchronize the axes. Now you should have a Gantt bar at the same place at the lower quartile mark of the box plot. You may need to adjust the Table Calc runs for it to calculate correctly
5) Bring the Distance Between Quartiles calculation onto the Size of the Gantt marks card. This should make the Gantt bar go the full length of the box. Expand the size so it matches the width exactly.
6) Finally bring whatever is on the Columns shelf onto the Color of the Gantt marks. Now each box plot is colored distinctly.
7) Push the Gantt bars to the back using Move Marks | Tableau Software and hide the secondary axis.
box plots of any color.twbx 1.1 MB