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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
sabd80
Helper II
Helper II

Rolling 12 month sum

Hi,

I would like to calculate the measure Rolling 12 Month Spend.

I need this measure by month, the figure of each month should be (current month + the previous 11 months).

For example, row 13 should be the sum of B2 to B13, row 14 should be the sum of B3 to B14 and so on, the silcer should not change this calculation.

2023-11-01_13-33-51.png

1 ACCEPTED SOLUTION

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

7 REPLIES 7
Ashish_Mathur
Super User
Super User

Hi,

PBI file attached,

Hope this helps.

Ashish_Mathur_0-1698807876799.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks @Ashish_Mathur , but it is showing the just the monthly amount.

I think the problem is the calendar table is not a date table.

You have obviously not chacked the file that i uploaded.  Study that carefully.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I have, and I have used the DAX you have provided before, so it is not new.

I am not sure what do you mean by Study that carefully.

As you can see in the screenshot, my solution is working fine.  I do not know the mistake that you are committing in your file.  Check the relationship.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

this is my measure:

Testing Rolling 12 ALL =
CALCULATE (
      [Total Spend $],
      DATESBETWEEN('Calendar - Invoice Date'[Calendar Date],          
        EDATE( MIN ( 'Calendar - Invoice Date'[Calendar Date]), -11 ) ,
        MAX ( 'Calendar - Invoice Date'[Calendar Date] )              
      )
)
 
and the relationship is the same as your
 
2023-11-01_15-30-34.png

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.