3 Replies Latest reply on Sep 23, 2019 4:32 AM by sander.binda

    Help with Upgrade and Downgrade Status based on ID and Date

    Sue Neil

      Hi,

       

      I have a Definition Value field from audit table which record Incident Priority change from '4 - Low', '3 - Moderate', '2 - High' and '1 - Critical' for a given Incident Number. Basically it will recorded upgrade and downgrade of Incident Priority.

       

      An example like below :

       

      problem.png

       

      I need to have a view in which to generate a filter having values - Upgrade and Downgrade.

       

      Can anyone help me accomplishing this?

        • 1. Re: Help with Upgrade and Downgrade Status based on ID and Date
          sander.binda

          You need to record all previous priorities and enable them as fields in Tableau. Only the previous priority will do as well.

           

          So lets say you have 2 fields: Current Priority and Previous Priority and they are stated as you have now like 2- High.

          You create the following calculation\

          IF INT(LEFT([Current Priority],1))>INT(LEFT([Previous Priority],1)) THEN 'Downgrade'

          ELSEIF INT(LEFT([Current Priority],1))<INT(LEFT([Previous Priority],1)) THEN 'Upgrade'

          ELSEIF INT(LEFT([Current Priority],1))<INT(LEFT([Previous Priority],1))  THEN 'No Change'

          ELSE 'Error' END

           

          The reason I wrote the calculation like this is to make absolutely sure that Downgrade only consists of a priority change when the number became higher, same goes for the other 2.

          I put in "ELSE 'Error' " to identifiy rows that have invalid priorities.

          • 2. Re: Help with Upgrade and Downgrade Status based on ID and Date
            Sue Neil

            Hi Sander,

             

            Thank you for your response. I'm quite new in Tableau. Can you help to elaborate further details on how can I record all previous priorities as fields in Tableau? I'm not sure how to accomplish this.

            • 3. Re: Help with Upgrade and Downgrade Status based on ID and Date
              sander.binda

              Hello Sue,

               

              I am afraid that this is not possible in Tableau. Your system where your audit table is should record the changes because you need to compare previous status with current status. If your system only registers the current status there is nothing to compare to.