3 Replies Latest reply on Jul 1, 2018 2:14 AM by Mansoor Khan

    Charting absolute values on a bubble chart

    Mansoor Khan

      I am a brand new user so this may be a stupid question, but here goes: I have a series of positive and negative numbers that I want to plot as bubbles/circles with the size representing the numerical value. By default, they are plotted such that the negative numbers have the smallest diameter. However, I want the absolute value of the number to determine the size so that 0.1 would have the smallest circle and +/- 100 would have the largest circles and these 2 would be the same size. There doesn't seem to be a simple way to do that.

       

      Also, how do I color code them so, say, all the -ve numbers are green and the +ve numbers are red?

       

      As an FYI I haven't created any variables so don't know how too create them or use them but I learn very quickly if I am told where to go and look.

       

      Thanks for your help!

        • 1. Re: Charting absolute values on a bubble chart
          garth.conrad

          Let's assume the value you are plotting is in a field [Value].

           

          (1) Drag the [Value] field to the SIZE mark. Right click on the sum([Value]) shown in the marks area. Select edit in shelf. Change the formula to: Sum(ABS([Value])).

          (2) Drag the [Value} field to the COLOR mark. Right click in the sum([Value]) shown in the marks area. Select edit in shelf. Change the formula to: Sum([Value]) / Sum(ABS([Value])).

          (3) Select the COLORS mark box, select edit colors. Check the stepped colors box. Change to 2 steps. Click on the color box on the left, change to red, OK.  Click on the color box to the right, select green, OK.  Select OK.

           

          G

           

          • 2. Re: Charting absolute values on a bubble chart
            Jeevan Krishna

            Hi Mansoor,

             

            Here is a quick intro on creating calculated fields - Create a Simple Calculated Field

             

            Now to solve your issue, you need to create a calculated field with the following formula.

             

            ABS([Field])

             

            which will convert both positives and negative values to absolute values.This will solve your sizing problem.

             

            To solve your coloring issue, you need another calculated field, that says,

             

            If [Field] > 0 then 'Green' else 'Red' end

             

            Use this field in color mark and assign the required colors over the default colors.

             

            Hope this helps.

            • 3. Re: Charting absolute values on a bubble chart
              Mansoor Khan

              Thank you this is exactly what I needed.

              1 of 1 people found this helpful