7 Replies Latest reply: Nov 7, 2017 4:03 AM by Ruben Marin RSS

    Change color by expression for a scatter plot bubbles?

    Rahul Joshi

      I want to change the color of my scatter plot bubbles based on their fractile(based on sales). I am using the following pece of code in expression:

       

      if ([Total Sale Quantity]<=Fractile(total [Total Sale Quantity],0.20), Red(),

      if ([Total Sale Quantity]<=Fractile(total [Total Sale Quantity],0.40), Blue(),

      if ([Total Sale Quantity]<=Fractile(total [Total Sale Quantity],0.60), Green(),

      if ([Total Sale Quantity]<=Fractile(total [Total Sale Quantity],0.80), Yellow(),

      LightRed()))))

       

      But, it is giving me lightRed fr all the bubbles. Please guide me where I am going wrong.

       

      Thanks,

      Best Regards,