1 Reply Latest reply on Mar 21, 2016 7:06 AM by Derrick Austin

    Conditional Formatting

    André Coelho

      Hello everyone!

       

      I'm trying to color different bullets charts in the same workbook using this calculated field ([Color]):

       

      IF ([Valor]) <= ([Valor (Plan4)])

          THEN "Na Meta"

      ELSEIF [Valor] <= (1.1*[Valor (Plan4)])

          THEN "Até 10% da Meta"

      ELSEIF [Valor] > (1.1*[Valor (Plan4)])

          THEN "Mais que 10% da Meta"

      END

       

      Where [Valor] is the current value of a dimension and [Valor (Plan4)] is the reference line in the bullet chart.

       

      The workbook has SUM(Valor) in columns, [Name] in rows, SUM(Valor(Plan4)) in marks and [Color] in the color marks.

      The problem here is that tableau is coloring bars with all colors intead of just one.

      The database is similar to:             City         /                    Name              /     YearMonth  /      Valor      /    Reference Line(Valor(Plan4))

                                                   Florianópolis            Folha de Pagamento             Jan/15          1000,00          500,00

                                                   Florianópolis            Folha de Pagamento             Fev/15          400,00            500,00

                                                             ...                    ...                    ...                    ...

       

      The question is: How to color the bullet charts just one time?

       

      Best Regards

       

      André

        • 1. Re: Conditional Formatting
          Derrick Austin

          Hey Andre,

           

          It seems as though you should aggregate your Valor columns:

           

          IF SUM([Valor]) <= ATTR([Valor (Plan4)])

              THEN "Na Meta"

          ELSEIF SUM([Valor]) <= ATTR(1.1*[Valor (Plan4)])

              THEN "Até 10% da Meta"

          ELSEIF SUM([Valor]) > ATTR(1.1*[Valor (Plan4)])

              THEN "Mais que 10% da Meta"

          END