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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

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
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors