Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Scatter Plot with a Rolling Average Line in Power BI

Hi all, I'm trying to recreate a chart similar to the one in the image below.  Currently I have just stacked 2 different plots one on top of each other, with transparent background and adjust...
  • v-venuppu's avatar
    1 year ago

    Hi Anonymous ,

    You can use a Line and Scatter Chart (or Combo Chart) to overlay:

    Scatter plot of raw X vs Y values
    Line plot of average Y per X-bin

    Here are few Steps to Implement:
    Create Bins for X-Axis (In your case bins are already created).

    Right-click your X-axis field - New Group
    Choose Bin Type: Number of Bins (e.g., 10)
    Create a Measure for Average Y per Bin:

    AvgY_PerBin = AVERAGE('Table'[Y])

    Create a Line and Scatter Chart or Combo chart:
    X-Axis: X (for scatter) and X_bin (for line)
    Y-Axis:
    Raw values: Y (scatter)
    AvgY_PerBin

    If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it! 

    Thank you.