Forum Discussion

AlB's avatar
AlB
Icon for Community Champion rankCommunity Champion
5 years ago
Solved

Quadrant colors in scatter plot

Hi all, Two questions regarding the scatter plot below: 1. We are looking to color the background of each of the four quadrants of a scatter plot. It would be a different color for each quadrant,...
  • amitchandak's avatar
    5 years ago

    AlB , For Color, I tried a measure like this using conditional formatting using field value

     

    Color Dot = 
        var _avgDisc = CALCULATE([Discount %],ALL(Sales))
        var _avgMargin = CALCULATE([Margin %],ALL(Sales))
        return switch(TRUE(),
        [Margin %]>=_avgMargin && [Discount %] <=_avgDisc , "Green",
        [Margin %]>=_avgMargin && [Discount %] >_avgDisc , "Blue",
        [Margin %]<_avgMargin && [Discount %] <=_avgDisc , "Yellow",
        [Margin %]<_avgMargin && [Discount %] >_avgDisc , "Red", "Black")

     

    where Margin % and Discount % are my axis.

     

    For question 2, I doubt power bi supported measure for that .

  • Pragati11's avatar
    Pragati11
    5 years ago

    Hi AlB ,

     

    If you bring in a image for a visual under plot area setting, it will work with if the visual is enlarged or smaller size.

    See like below I have added a custom image created in powerpoint under the plot area of the scatter plot: (you can play around with the image size in order to fit best on your visual in powerpoint)

     

    Now if I view this visual in focus mode, it adjusts by visual size:

     

    I have used this work-around before on one of the reports I have worked on, therefore suggested same.

     

    Hope this helps. 🙂

     

    Thanks,

    Pragati