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
Hi all!
I have a table with two column "EvaluationDate" and "Evaluation". In the first column I have dates, in the second numbers.
Given a specific month and year that can be changed through a slicer, I want to calculate the AVERAGE(Evaluation) for that month and the previous 12 months, and show the results in an histogram or line chart.
Any suggestions?
Thank you!
Solved! Go to Solution.
Hello @SebaSpotti ,
Firstly make sure to have "Date table" created and map date table "Dates" to "Evaluation Date" then please try the below code..
This measure will help to go back 12 month and see the data..
RollingAvgEval =
CALCULATE(AVERAGE('YourTable'[Evaluation]),
DATESINPERIOD('DateTable'[Date],
MAX('YourTable'[EvaluationDate]),-12,MONTH))
Finally, Drag the Datetable column to the axis of the chart and measure created and adjust the axis accordingly
If you find this helpful , please mark it as solution and Your Kudos/Likes are much appreciated!
Thank You
Dharmendar S
Hello @SebaSpotti ,
Firstly make sure to have "Date table" created and map date table "Dates" to "Evaluation Date" then please try the below code..
This measure will help to go back 12 month and see the data..
RollingAvgEval =
CALCULATE(AVERAGE('YourTable'[Evaluation]),
DATESINPERIOD('DateTable'[Date],
MAX('YourTable'[EvaluationDate]),-12,MONTH))
Finally, Drag the Datetable column to the axis of the chart and measure created and adjust the axis accordingly
If you find this helpful , please mark it as solution and Your Kudos/Likes are much appreciated!
Thank You
Dharmendar S
Hi!
Yes, I tried this solution but it works only for the last month (see MAX('YourTable'[EvaluationDate]) ). I would like to chose the month from which going backward.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |