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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
JOKA
Advocate I
Advocate I

Rolling 12 months issue

Hi!

 

I´m struggling to create a new measure that shows the sum of the last 12 months. I would be very grateful if someone could help.

 

This is the problem:

 

- I have the measure "Execution" from the dataset (excel). It is the cummulative sum in the fiscal year (July to June). 

 

- In Power BI I created a new measure called "Execution" that calculates the execution for each month:

Execution = CALCULATE([Execution]-[Previous Month Execution])
Where:
Previous Month Execution = CALCULATE([Execution];PREVIOUSMONTH('Date'[Date]);'Date'[Month]<>"June")
 
All of this is correct. But now I need to show the sum of the last 12 month of Execution. For doing that in Power BI I created a new measure called "L12M" using this formula:
L12M = CALCULATE (
[Execution];
DATESBETWEEN (
'Date'[Date];
NEXTDAY ( SAMEPERIODLASTYEAR ( LASTDATE ('Date'[Date]) ) );
LASTDATE ( 'Date'[Date])
)
)
 
But instead of the sum of Execution, it is showing the sum of cummulated Execution.
Imagen1.png
Does anyone know what I am doing wrong?
 
Thank you so much for your help!!!
3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Please explain the business question, share some data (in a format that can be pasted in MS Excel or share the download link of the PBI file) and also show the expected result.


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

Have you considered trying something like PARALLELPERIOD() or PREVIOUSMONTH()





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Thank you for your reply!

 

Not sure what you mean. Could you be more specific?

I have already used PREVIOUSMONTH

 

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.