Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I want to calculate the rolling average of the last 12 months while the current month should be excluded.
There should be two variants:
In addition, I want to create a bar chart that shows the last 12 months (+ current month) WITH months where consumption is 0.
The problem is that in months without consumption the value is empty.
Bar Chart 1 is what I get (months with no consumption are missing).
Bar Chart 2 within the yellow rectangle is what I want (within last 12 months + current month; showing also months with no consumption; but it should not show months of the future or prior last 12 months)
Example table
Table I want to have in my report view
Bar Chart 1
Bar Chart 2
@TimmK , the expected output is not very clear.
With help from date table a formula like this example
Rolling 12 = divide( CALCULATE(sum(Sales[Sales]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date]),-12,MONTH)) ,
CALCULATE(distinctCOUNT('Date'[Month Year]),DATESINPERIOD('Date'[Date],MAX('Date'[Date]),-12,MONTH), filter(Sales,not(isblank(sum(Sales[Sales]))))))
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 13 | |
| 10 | |
| 8 |