Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
sureshcu
Helper I
Helper I

Moving sum

Hi,

 

I have data from 2005 to till data. I want to show last twelve months rolling total wherein previous years total to be added.the following measure is showing only month on month total. but it is not counting previous years total. 

 

Months From Today = IFERROR(DATEDIFF('WF PER028-Employee Detail'[Hire Dt - Most Recent],TODAY(),MONTH),-1)

 

Example: It has to show total till Sep-16 from 20015 Plus Aug-16 total. Similarly For Sep-16. it should show Aug-16 plus Sep-16.

 

Aug-16, Sep-16, Oct-16, Nov-16, Dec-16, Jan-17, Feb-17, Mar-17, Apr-17, May-17, Jun-17, Jul-17

 

 

1 REPLY 1
TomMartens
Super User
Super User

Hey,

 

I have to admit, that do not fully understand your requirement so for this reasom I'm not sure if this is what you are looking for.

Here you will find an example.

 

On the report page you will find an example for y rolling sum, that is calculated with this measure:

Rolling Sum last 12 Months = 
var endDate = CALCULATE(MAX('Calendar'[Date]))
var startDate = MAXX(DATEADD('Calendar'[Date], -12, MONTH),'Calendar'[Date])
return
CALCULATE(
	SUM('FactWithDates'[Amount])
	,DATESBETWEEN('Calendar'[Date],startDate,endDate)
)

Please be aware, that the report shows Month whereas the Measure considers day, so for this reason it is not valid to add up the depicted Months 😉

 

Hope this helps

Regards



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Fabric Data Days is here Carousel

Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.