Forum Discussion
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, as indicated in the screen cap below. Any ideas on how to do it?
2. The dotted lines shown are built thought constant lines on the Analytics pane. Is there a way for those to be dynamic, i.e. to be placed at the middle of the ranges shown for the x and y axis? Those ranges will change as a result of filtering.
Many thanks
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 .
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
4 Replies
- amitchandak
Super User
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 .
- AlB
Community Champion
Thanks very much amitchandak
What you suggest is to color the dots, if I understand correctly? That is a actually a good alternative. Is there a way though to do something similar to color the background in each quadrant? I tried a couple of things with conditional formatting of the background but didn't get it to work. Any ideas?
Pragati11 Thanks a lot for the prompt response. I'd thought of that but was wondering whether a static picture would get misaligned if the data shown in the visual changes. Will the image be scaled automatically if the size of the image changes? I'll check. Actually, we could then include the dotted lines that separate the quadrants in the image as well, right?
- Pragati11
Super User
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