cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ClausVad
New Member

stop date sum running 12 month

I have this measure, that i want to stop at last closed month. Measure is the line value

 

lbn 12 =
CALCULATE (
SUMX('running 12',[Salesrunning.PNG] ),
DATESINPERIOD (
'running 12'[SalesDate].[Date] ,
LASTDATE ( 'running 12'[SalesDate].[Date] ),
-12,
MONTH
)
    )
1 ACCEPTED SOLUTION

@ClausVad , Try if this formula can help

 

bn 12 =
var _max = maxx(allselected('running 12'),'running 12'[SalesDate].[Date])
return
CALCULATE (
SUMX('running 12',[Salesrunning.PNG] ),
DATESINPERIOD (
'running 12'[SalesDate].[Date] ,
LASTDATE ( 'running 12'[SalesDate].[Date] ),
-12,
MONTH
) , 'running 12'[SalesDate].[Date] <= _max
)

 

or refer to this video, as I doubt above will give rolling 12 month :   https://www.youtube.com/watch?v=duMSovyosXE



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

5 REPLIES 5
ClausVad
New Member

lbn 12 =
CALCULATE (
SUMX('running 12',[Sales] ),
DATESINPERIOD ('running 12'[SalesDate].[Date] ,
LASTDATE ( 'running 12'[SalesDate].[Date] ),
-12,
MONTH
)
    )
ClausVad
New Member

Sorry for missplacing pic. 😉

@ClausVad , Try if this formula can help

 

bn 12 =
var _max = maxx(allselected('running 12'),'running 12'[SalesDate].[Date])
return
CALCULATE (
SUMX('running 12',[Salesrunning.PNG] ),
DATESINPERIOD (
'running 12'[SalesDate].[Date] ,
LASTDATE ( 'running 12'[SalesDate].[Date] ),
-12,
MONTH
) , 'running 12'[SalesDate].[Date] <= _max
)

 

or refer to this video, as I doubt above will give rolling 12 month :   https://www.youtube.com/watch?v=duMSovyosXE



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Sorry 🙂 was a bit to fast in conclusion 

It worked with a little twist from your video

Didn't work🤔

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors