Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dollarvora
Helper I
Helper I

Scatter Plot with a target line and an average line

I've a dataset with Month and some values, I also have the target information and also the average information
I was wondering how do I visualize all of this in the format below 

dollarvora_0-1610657732885.png

 

 

For instance consider the below dataset

valuemonth
67.42436398November 1, 2020
68.32667872October 1, 2020
68.33531963September 1, 2020
69.05157567August 1, 2020
69.99631021July 1, 2020
70.36755373June 1, 2020
70.58675967May 1, 2020
70.34220032April 1, 2020
70.44322918March 1, 2020
71.29026149February 1, 2020
71.16770719January 1, 2020
70.71456397December 1, 2019

 

The target could be 70%, now every values above the target would be green, every value thats on the target would be yeelow and those below would be red and the average  line (yellow line) would be constant in my case

I'm having a hard time finding any extenal visuals that can help with this 

Thanks

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @dollarvora 

 

You can create a measure for dot color like below. Put Month in X axis and Value in Y axis. Format Data colors by Field value based on below measure. Then add a Y-Axis Constant Line with value 70 and an Average Line for Value. You can change their colors and line styles.

Dot Color = 
VAR thisValue =
    SELECTEDVALUE ( 'Table'[value] )
VAR targetValue = 70
RETURN
    SWITCH (
        TRUE (),
        thisValue > targetValue, "Green",
        thisValue = targetValue, "Yellow",
        thisValue < targetValue, "Red"
    )

012702.jpg012703.jpg

 

Kindly let me know if this helps.
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.

View solution in original post

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @dollarvora 

 

You can create a measure for dot color like below. Put Month in X axis and Value in Y axis. Format Data colors by Field value based on below measure. Then add a Y-Axis Constant Line with value 70 and an Average Line for Value. You can change their colors and line styles.

Dot Color = 
VAR thisValue =
    SELECTEDVALUE ( 'Table'[value] )
VAR targetValue = 70
RETURN
    SWITCH (
        TRUE (),
        thisValue > targetValue, "Green",
        thisValue = targetValue, "Yellow",
        thisValue < targetValue, "Red"
    )

012702.jpg012703.jpg

 

Kindly let me know if this helps.
Community Support Team _ Jing Zhang
If this post helps, please consider Accept it as the solution to help other members find it.

amitchandak
Super User
Super User

@dollarvora , You will be able to color, Bu will not able draw excat like. Because power will allow on simple Avg line

I have done 4 color, you can do 2

https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-4-Customers-to-Retain-Segmen...

 

Line in added in this video

https://youtu.be/Q1vPWmfI25o?t=2847

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.