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
akashmish
Frequent Visitor

Last twelve month Cumulative Sum of measure

Hi All,

 

I am a newbie in Power BI and got stuck in a simple calculation where I have a SSAS Cube connected with my Power BI Desktop, what I want is to create a dax measure to calculate Last twelve month moving sum of revenue with respect to "Sales Month", the datatype in "sales Month" is in date format.

 

I am able to calculate Running sum but not able to write dax to make it show Previous 11 Cumulative on a specific date.

 

I would be grateful to you if you can help me solve this.

 

Regards,
Akash

1 ACCEPTED SOLUTION
akashmish
Frequent Visitor

Hi Got the solution :-

 

Rolling_Revenue_12_Months =
CALCULATE (
SUMX( Table_Name, [Revenue] ),
DATESINPERIOD (
Table_Name[Date],
LASTDATE ( Table_Name[Date] ),
-12,
MONTH
)
)

 

View solution in original post

1 REPLY 1
akashmish
Frequent Visitor

Hi Got the solution :-

 

Rolling_Revenue_12_Months =
CALCULATE (
SUMX( Table_Name, [Revenue] ),
DATESINPERIOD (
Table_Name[Date],
LASTDATE ( Table_Name[Date] ),
-12,
MONTH
)
)

 

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.