4 Replies Latest reply on Apr 10, 2018 7:13 AM by Jim Dehner

    Dynamically change Shape for a measure value

    Jon Carpenter

      I am trying to cause a Measure placed on the Shape Marks to change to one of three shapes based upon if the value is Positive, Zero or Negative. I can do it manually, but need the ability to have this occur programmatically and not sure how to do this.

        • 1. Re: Dynamically change Shape for a measure value
          Sankarmagesh Rajan

          Hi Jon,

           

          Write the calculation as

          IF [Calculation] > 0 THEN "Up"

          ELSEIF [Calculation] = 0 THEN "No Change"

          ELSEIF [Calculation] < 0 THEN "Down"

          END

           

          Drag this into shape and assign then relevant shapes.

           

          Thanks

          sankar

          1 of 1 people found this helpful
          • 2. Re: Dynamically change Shape for a measure value
            Jim Dehner

            Hi Jon

            I had to use superstore data - would have preferred to use your data top show the full effect -

            the data I used only had positive and negative values - no zeros

             

            the formula I used is

             

            then place on shape tile and edit the shapes to the ones you want

             

             

            It returns this

             

             

            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
            • 3. Re: Dynamically change Shape for a measure value
              Jon Carpenter

              Hi Jim,

               

              Thanks for your response... I wish it was as simple as that. Your solution does work to show Positive, Negative and Zero values with a uniquely assigned shape, but my issue is I only want the change of shape to occur if over a set time frame (1-31 days) the value changes from one day to the next. e.g. -  Day 1-2 value is the same so the default shape would stay the same, Day 3-31 it increases day by day so the shape changes to an up arrow based upon that change. I got it to work using this process if I manually edit the values manually based upon the values listed (Neg or Pos), but to get it to change shape dynamically based upon a positive or negative change I am unable to figure out.

               

              Example reference shown below:

               

              ShapeUpdates.PNG

              • 4. Re: Dynamically change Shape for a measure value
                Jim Dehner

                If you choose to share your workbook I will gladly help out

                Please attach a twbx workbook with the the data (even dummy data will  work)

                Jim