3 Replies Latest reply on Jan 20, 2018 2:17 PM by Joe Oppelt

    Conditional Formatting for multiple Measures

    Marissa Sarlls

      I have one dimension (Age & Gender) but multiple measures. I would like to apply conditional formatting for each measure/column based on the average at the bottom. For example, if Cost is above the average, text or cell is red. If Cost is below the average, text or cell is green. However, it's the opposite for Imps. If Imps is above the average, text or cell is green. If Imps is below the average, text or cell is red.

      This is a dynamic dashboard so I would like Tableau to detect the average (bottom row) and apply conditional formatting, NOT apply formatting based on a specific number because that changes with each data set. Tableau Conditional Formatting.JPG

        • 1. Re: Conditional Formatting for multiple Measures
          Joe Oppelt

          There is a trick that lets you do this, but it's hard to describe.  Can you post a sample workbook so I can show you?

           

          Essentially you put SUM(0) in your columns shelf, as many times as you have measures you want to display.  Then you put the individual measures on the TEXT shelf for each individual mark type, and you can color each one by different criteria.

          • 2. Re: Conditional Formatting for multiple Measures
            Marissa Sarlls

            Yes, I posted a sample workbook.

            • 3. Re: Conditional Formatting for multiple Measures
              Joe Oppelt

              (10.4 here)

               

              In the attached I did two of your measures.  You can model the rest in the same way.

               

              To get more SUM(0) pills in the COLUMNS shelf, just double click in the empty part of the COLUMNS shelf, and you will get a little edit box.  Just type in 0 and hit return.  Now you have a new mark.  For that mark, drag SUM(next_measure) onto TEXT.  Hack up a new Color calc, and drag that onto COLORS.  Then click in the axis that just says 0 and EDIT AXIS.  Change the name of the axis to whatever you want.  Then click the tab that says "Tick Marks" and change the tick marks to NONE.  (Minor ticks really won't matter here, but I turned them off too.)

               

              You can see that I picked different colors and fonts in this sheet.  You probably aren't going to want that, but I did that to demonstrate how you can format each measure however you want.

               

              See attached.