1 Reply Latest reply on Oct 11, 2018 6:51 AM by Jim Dehner

    abc field with 0 1 2... how to apply a rule for tableau

    JP Favre

      Hello there,

       

      i am working on the filled which looks like this. As you can see there are plenty of fields with 1 2 or 0. basically it is a test that my colleague from IT are doing.

      if the field is filled in correctly i will have '1'

      If the field is not filled correctly i will get a '2'

      if the field is empty i will get a '0'

      2018-10-11_08h55_14.png

       

      Due to the fact that this is a quality check for a client i need to represent EACH field in a manner that they can read it...so what i am doing currently is ..

       

      Create alias to replace 0 1 and 2 by valid value / non compliant value & value not filled

      and changing the colors for green, orange and red..

       

      My question is the following,..is there a way with Tableau to automatically replace ALL the 0 1 and 2 and add colors ... because i need to do this exercice for simple graph for more than 25 fields.

       

      Attached is a sample of my dataset.

       

      thanks for your help

      JP

       

       

      2018-10-11_09h09_01.png

        • 1. Re: abc field with 0 1 2... how to apply a rule for tableau
          Jim Dehner

          Good morning

          Please see the attached

          In the sample data I only saw 2 fields with the 0,1,2 indicator - the process would be the same with more

          firs I pivoted the indicator data around the name      Pivot Data from Columns to Rows

          to produce a data set that looked like this

           

          now it is easy to create a text table like this

           

          but to your point then change the values to text with this

           

          and create the bar chart like this

           

          the percent of total is just a table calc on the record count

           

          Jim

          If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.

          1 of 1 people found this helpful