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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi all,
Out data range is for 48 months. We are trying to calculate the running total that should start from 13th month onward considering last 12 months. And for 14th month (next year) this should have Month 2 to Month 13, so on and so forth. A small excel snippet is below. Can we do this in DAX? Much appreciate your inputs.
Calculation to start after skipping 12 months and then rolling sum
Solved! Go to Solution.
Hi,
Please check the below picture and the attached pbix file.
Expected result measure: =
VAR _currentmonth =
MAX ( Data[Month] )
VAR _prev12months = _currentmonth - 12
VAR _monthfilter =
FILTER (
ALL ( Data[Month] ),
Data[Month] >= _prev12months
&& Data[Month] <= _currentmonth - 1
)
RETURN
IF ( COUNTROWS ( _monthfilter ) = 12, SUMX ( _monthfilter, [Value measure:] ) )
I believe I should post my scenario in more detail where I have one date for each month and the value correspondingly. The month number doesn't exist in real data since it could start anywhere in last 3 years. I will open with correct dataset as a new thread.
But, Thank you @Jihwan_Kim This looks great. I should mark this as solved at least for what I've asked initially.
Hi,
Please check the below picture and the attached pbix file.
Expected result measure: =
VAR _currentmonth =
MAX ( Data[Month] )
VAR _prev12months = _currentmonth - 12
VAR _monthfilter =
FILTER (
ALL ( Data[Month] ),
Data[Month] >= _prev12months
&& Data[Month] <= _currentmonth - 1
)
RETURN
IF ( COUNTROWS ( _monthfilter ) = 12, SUMX ( _monthfilter, [Value measure:] ) )
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 |
|---|---|
| 11 | |
| 9 | |
| 9 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 27 | |
| 22 | |
| 19 | |
| 17 | |
| 11 |