Forum Discussion

Pigna's avatar
Pigna
Icon for Advocate IV rankAdvocate IV
8 years ago

Negative sizes in bubble chart and treemap

I would like to make a bubblechart/treemap where the size is controlled by the measure X and the saturation by the measure Y.

The problem is that X can be negative.

 

Is there a way to draw a bubblechart/treemap where the size depends on the absolute value of X, the saturation depends on the value of Y, but the color is different depending on the sign of X (for instance, red is positive, blue is negative)?

The standard bubblechart/treemap doesn't seem to allow this.

Thanks for the help.

2 Replies

  • v-frfei-msft's avatar
    v-frfei-msft
    Icon for Community Support rankCommunity Support

    Hi Pigna,

     

    Maybe you can use the ABS function to get the absolute value. For more details, please check the online document. If it doesn't meet your requirement. kindly share your pbix and excepted result to me.

     

    Regards,

    Frank

    • Pigna's avatar
      Pigna
      Icon for Advocate IV rankAdvocate IV

       Hi v-frfei-msft

       

      unfortunately that doesn't fix the problem.

      Firstly I am using AS, so I cannot use DAX.

      Secondly, the problem is not about how to transform a measure in absolute value.

       

      Say I have 2 values:

       

      id | size | saturation

      A  | 5     | 0.3

      B  | -5    | 0.3

      If I use the absolute value of size I will get two rectangles with the same size, same color and same saturation.
      But they should have same size, DIFFERENT color and same saturation to make any sense, otherwise it seems that A and B are the same.

       

      I have a pbix but I don't have your email.