Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
I create a monthly report with average-month-values. The table starts in january 1971 and ends with the current month.
Now i try to implement a value, which shows the running average from start-date until the current reporting-period (Month).
So for example:
Date / Value / Average
1971-Jan / 31 / 31
1971-Feb / 35 / 33
1971-Mar / 36 / 34
...
2023-Feb / 411 / 188
I tried it with DATESINPERIOD and with DATESBETWEEN. Unfortunately i have no experience with DAX and it's not so easy to find some help or examples for this examples.
{
"name": "AVERAGE_test1",
"expression": "CALCULATE([Value], DATESBETWEEN(Calender[Date], MIN(Date[Datum]), LASTDATE(Calender[Date])))"
}
{
"name": "AVERAGE_test2",
"expression": "CALCULATE([Value], DATESINPERIOD(Calender[Date], LASTDATE(Calender[Date]), DATEDIFF(FIRSTDATE(Calender[Date]), LASTDATE(Calender[Date]),MONTH), MONTH))"
}
Do I need a COUNTROW-function or something in this way?
Thanks for your help! 🙂
Solved! Go to Solution.
Hi @Anonymous ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a measure.
Average =
var _a= CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])))
var _b= CALCULATE(COUNTROWS(FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date]))))
return
DIVIDE(_a,_b,0)
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
According to your description, here are my steps you can follow as a solution.
(1) This is my test data.
(2) We can create a measure.
Average =
var _a= CALCULATE(SUM('Table'[Value]),FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date])))
var _b= CALCULATE(COUNTROWS(FILTER(ALL('Table'),'Table'[Date]<=MAX('Table'[Date]))))
return
DIVIDE(_a,_b,0)
(3) Then the result is as follows.
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.
Best Regards,
Neeko Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you! 🙂
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 75 | |
| 36 | |
| 31 | |
| 29 | |
| 26 |