Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
I have month year data on X-axis in a scatter plot. For example (Jan-2024, Feb-2024 etc.) I would like to show EWMA line on teh same scatter plot.
What are my options.
Solved! Go to Solution.
Hi @rehansaeed2468 ,
Power BI doesn’t have a native EWMA option, but you can achieve this by creating a DAX measure to calculate the EWMA values. Once the measure is created, you can use it in the Analytics (Advanced analytics) section of the scatter plot to display the EWMA as a line.
Power BI doesn’t support EWMA (or any other moving-average / trend line) natively in a scatter chart, so there’s no built-in switch for this.
If you still want to show an EWMA line, you basically have three options.
The first option is to calculate EWMA as a DAX measure and plot it together with your original measure in the same scatter chart.
This works, but it’s important to understand the trade-offs: the calculation is relatively heavy, it requires a proper calendar table, and it’s suitable mainly for visualization purposes (not for detailed analysis).
A simplified example of an EWMA measure:
EWMA :=
VAR Alpha = 0.3
VAR CurrentDate =
MAX ( 'Calendar'[Date] )
VAR DatesUpToCurrent =
FILTER (
ALL ( 'Calendar'[Date] ),
'Calendar'[Date] <= CurrentDate
)
VAR WeightedTable =
ADDCOLUMNS (
DatesUpToCurrent,
"t",
RANKX (
DatesUpToCurrent,
'Calendar'[Date],
,
DESC
),
"Value", [Value]
)
VAR Numerator =
SUMX (
WeightedTable,
[Value] * Alpha * POWER ( 1 - Alpha, [t] - 1 )
)
VAR Denominator =
SUMX (
WeightedTable,
Alpha * POWER ( 1 - Alpha, [t] - 1 )
)
RETURN
DIVIDE ( Numerator, Denominator )
The second option is to reconsider the visual itself.
If your X-axis is Month-Year and your Y-axis is a single KPI, you’re effectively working with a time series. In that case, a line chart is usually the more appropriate choice and will make an EWMA line much easier to read, explain, and maintain.
The third option is to pre-calculate EWMA outside Power BI (SQL, Power Query, Python/R) and then load it as a regular column. From both a performance and modeling perspective, this is often the cleanest solution, especially for long time series or production-grade reports.
One important note: if the scatter chart is only being used to show values over time, it doesn’t really add analytical value and mostly introduces limitations. In many cases, switching to a line chart is not a compromise — it’s the correct modeling decision.
Hi @rehansaeed2468 , Hope you're doing okay! May we know if it worked for you, or are you still experiencing difficulties? Let us know — your feedback can really help others in the same situation.
Hi @rehansaeed2468 , Thank you for reaching out to the Microsoft Community Forum.
We find the answer shared by @Ritaf1983 is appropriate. Can you please confirm if the solution worked for you. It will help others with similar issues find the answer easily.
Thank you @Ritaf1983 for your valuable response.
Were you able to check the custom visual like Deneb? They had created a sample scatterplot with a line; maybe you can tweak it a little and get it to work for your needs https://marketplace.microsoft.com/en-gb/product/power-bi-visuals/coacervolimited1596856650797.deneb?...
Power BI doesn’t support EWMA (or any other moving-average / trend line) natively in a scatter chart, so there’s no built-in switch for this.
If you still want to show an EWMA line, you basically have three options.
The first option is to calculate EWMA as a DAX measure and plot it together with your original measure in the same scatter chart.
This works, but it’s important to understand the trade-offs: the calculation is relatively heavy, it requires a proper calendar table, and it’s suitable mainly for visualization purposes (not for detailed analysis).
A simplified example of an EWMA measure:
EWMA :=
VAR Alpha = 0.3
VAR CurrentDate =
MAX ( 'Calendar'[Date] )
VAR DatesUpToCurrent =
FILTER (
ALL ( 'Calendar'[Date] ),
'Calendar'[Date] <= CurrentDate
)
VAR WeightedTable =
ADDCOLUMNS (
DatesUpToCurrent,
"t",
RANKX (
DatesUpToCurrent,
'Calendar'[Date],
,
DESC
),
"Value", [Value]
)
VAR Numerator =
SUMX (
WeightedTable,
[Value] * Alpha * POWER ( 1 - Alpha, [t] - 1 )
)
VAR Denominator =
SUMX (
WeightedTable,
Alpha * POWER ( 1 - Alpha, [t] - 1 )
)
RETURN
DIVIDE ( Numerator, Denominator )
The second option is to reconsider the visual itself.
If your X-axis is Month-Year and your Y-axis is a single KPI, you’re effectively working with a time series. In that case, a line chart is usually the more appropriate choice and will make an EWMA line much easier to read, explain, and maintain.
The third option is to pre-calculate EWMA outside Power BI (SQL, Power Query, Python/R) and then load it as a regular column. From both a performance and modeling perspective, this is often the cleanest solution, especially for long time series or production-grade reports.
One important note: if the scatter chart is only being used to show values over time, it doesn’t really add analytical value and mostly introduces limitations. In many cases, switching to a line chart is not a compromise — it’s the correct modeling decision.
Hi @rehansaeed2468 ,
Power BI doesn’t have a native EWMA option, but you can achieve this by creating a DAX measure to calculate the EWMA values. Once the measure is created, you can use it in the Analytics (Advanced analytics) section of the scatter plot to display the EWMA as a line.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 53 | |
| 51 | |
| 39 | |
| 15 | |
| 14 |
| User | Count |
|---|---|
| 95 | |
| 78 | |
| 34 | |
| 28 | |
| 25 |