The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi there,
can anyone help, to get my goal:
I am trying to build a dynamic moving average line inside my diagram based on the selection of months in a year or between years.
For example:
KPI
I select June 23 to May 24 in "Month Slicer" for showing up 1 year of specific raw data for kpi
Now i want to have a moving average line too, which calculates this timeline, but be dynamic if i change months from June 23-May24 to for example August 23 - September 24.
How can i solve this?
Hi @Fiddel86 ,
Perhaps the following dax expression could be used.
DATESINPERIOD function (DAX) - DAX | Microsoft Learn
CALCULATE(
AVERAGE('Table'[Amount]),
DATESINPERIOD(
'DateTable'[Date],
LASTDATE('DateTable'[Date]),
-1,
YEAR
)
)
If I'm misunderstanding, please provide simple data and show the expected results as a picture.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
98 | |
94 | |
87 | |
70 | |
65 |
User | Count |
---|---|
244 | |
127 | |
119 | |
81 | |
78 |