4 Replies Latest reply on Oct 25, 2017 11:33 AM by Eric Kurtz

    How to build a colorized table based on discrete values?

    Eric Kurtz

      I feel like I'm over complicating this, but.... We have a project monitoring table currently in excel that I'd like to port into Tableau. It's essentially project by row with an integer score of 1-5 (data type set to integer) for various targets (see screen cap below) that determines the color. Data is organized in the same tabular fashion... is there any way to get this similar view to show in Tableau?

       

      I'd like to display it in the same tabular format, but also use the integer to dictate the color.

       

      Thanks in advance!

       

        • 1. Re: How to build a colorized table based on discrete values?
          Ben Neville

          It's a bit tricky without some sample data to give you a decent example, but the short answer is yes. This would depend on how your data is organized, though. If Schedule/Budget/Resource etc. are columns in your data as opposed to the actual values within some larger "Type" or "Classification" column, you'll need to use multiple measures. If they're in the same column, it's a bit easier.

           

          If you take a dimension and put it on rows, another dimension and put it on columns, then drop a measure onto color, you will get this view by default (it uses a mark type of Square). The caveat is if you're coloring on a dimension the approach is slightly different, so it depends on how your calculation is written to bucket into RAG colors. There's actually a good example of the former that's already available to you. If you open a new workbook in Tableau (click the Tableau logo in the upper left if you're on the "canvas" view as opposed to the default splash screen), you should see 3 workbooks that ship with the product near the bottom middle of your screen. Open World Indicators and navigate to the Health Indicators tab and you'll have a good reference to work from.

           

          if this same technique doesn't work for you, update us with your issue or some sample data and perhaps we can help you find out where things are amiss.

          • 2. Re: How to build a colorized table based on discrete values?
            Eric Kurtz

            Ben,

            Appreciate the response. Ideally I'd like to keep the Schedule/Budget/Resource etc in separate columns (see below - sorry this won't let me attach any files directly). I'd then like Tableau to display a similar table, just using colors to fill in for the numbers - where 1 is green and 5 is red.

             

            Unfortunately the Health indicators sample you mentioned is either different on my version of desktop (still on 9.2 at work ) or not what I'm going for, so hopefully this can point you in the right direction.

             

            Thanks!!

            • 3. Re: How to build a colorized table based on discrete values?
              Ben Neville

              Yeesh - tell your work to upgrade! Luckily for you, I have 9.0 - 10.5 on my machine so I can help.

               

              I've included several variants just for you to have for future reference, the first ones all starting with assuming your columns are a single metric, and building up to the most complex example, which is probably the one you need. It's really not too complex, you just need to use a few MIN(1) fields and you're good to go. In case you've never seen this "hack", we're essentially creating a placeholder axis by drawing a bar that is 1 "unit" long. The minimum of 1 is 1, so all bars are of uniform length. That's really the only trick - the rest is pretty straightforward.

               

              Hope it helps.

              • 4. Re: How to build a colorized table based on discrete values?
                Eric Kurtz

                Woo that's the one! Your "multiple measures" tab was just what I was going for... Thanks for your help!