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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello I have the following data:
For the visualisation the OEE data will be shown by Produktgroup in a Linechart. Now i want to add a moving average for each of the 3 productgroups. I tried adding a calculated Column and tired doing it with a measure but each time i cant add the moving average to the chart.
Here is the code i tried:
Moving Average =
AVERAGEX(
DATESINPERIOD(
'OEE nach Linie'[Buchungsdatum],
LASTDATE('OEE nach Linie'[Buchungsdatum]),
- 14 ,
DAY),
CALCULATE(sum('OEE nach Linie'[OEE nach Linie]))
)
I would appreciate some help, im new to Power BI
Thanks in advance
Solved! Go to Solution.
@Micha3lS , You can create a measure like
Moving Average =
AVERAGEX(values('OEE nach Linie'[productgroups])
,
CALCULATE(sum('OEE nach Linie'[OEE nach Linie]),DATESINPERIOD(
'OEE nach Linie'[Buchungsdatum],
LASTDATE('OEE nach Linie'[Buchungsdatum])
- 14 ,
DAY))
)
Seem like this scatter visual, Go and add constant line, in new version there is Fx, click on that and take this measure)
@Micha3lS , You can create a measure like
Moving Average =
AVERAGEX(values('OEE nach Linie'[productgroups])
,
CALCULATE(sum('OEE nach Linie'[OEE nach Linie]),DATESINPERIOD(
'OEE nach Linie'[Buchungsdatum],
LASTDATE('OEE nach Linie'[Buchungsdatum])
- 14 ,
DAY))
)
Seem like this scatter visual, Go and add constant line, in new version there is Fx, click on that and take this measure)
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 130 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |