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
I have monthly order data over many fiscal years (the fiscal year starts April 1 and ends May 31). I am having trouble creating a rolling sum of the order data by month by year. I have read about various other approaches but none of them seem to work for me. An example of what I would like is below:
| Year 1 | Year 2 |
April 1 0
May 1 1
June 2 2
July 0 0
August 5 3
September 1 0
October 1 1
November 0 2
December 2 3
January 4 1
February 1 1
March 1 1
Total 19 15
Would Become:
| Year 1 | Year 2 |
April 1 0
May 2 1
June 4 3
July 4 3
August 9 6
September 10 6
October 11 7
November 11 9
December 13 12
January 17 13
February 18 14
March 19 15
Total 19 15
I created a Calendar Table with Date, DateYear, and DateMonth columns.
My Data Table has Order Qty, Order Date, and FY (Fiscal year) columns.
If someone could help me create this measure and then explain what it was doing, it would be great!
Solved! Go to Solution.
Hi @intern56,
You can try to use below formula to calculate the rolling total:
Steps:
1. Add calculated column to convert month to date.
Date = DATEVALUE([Month]&"/"&2017)
2. Write rolloinh total measure based on date column.
rolling year 1 = SUMX(FILTER(ALLSELECTED('sample'),[Date] <=MAX([Date])),[Year 1])
rolling year 2 = SUMX(FILTER(ALLSELECTED('sample'),[Date] <=MAX([Date])),[Year 2])
Regards,
Xiaoxin Sheng
Hi @intern56,
You can try to use below formula to calculate the rolling total:
Steps:
1. Add calculated column to convert month to date.
Date = DATEVALUE([Month]&"/"&2017)
2. Write rolloinh total measure based on date column.
rolling year 1 = SUMX(FILTER(ALLSELECTED('sample'),[Date] <=MAX([Date])),[Year 1])
rolling year 2 = SUMX(FILTER(ALLSELECTED('sample'),[Date] <=MAX([Date])),[Year 2])
Regards,
Xiaoxin Sheng
Cool it works thanks
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |