cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
setis
Post Partisan
Post Partisan

DATESINPERIOD 6 months back starting from last month

I need to calculate a measure with an interval of:

Current month -7  to last month.

 

The measure for the last 6 months is the following, but I need to do it from Current month -7 to current month -1

 

Avrg 6M = 
CALCULATE(
    [Measure] ;
    DATESINPERIOD(
        Calendar[Date];      
        LASTDATE(Calendar[Date]);
        -6;
        MONTH
    )
)

Could somebody help, please?

 

 

1 ACCEPTED SOLUTION
rajulshah
Solution Sage
Solution Sage

Hello @setis,

Please try the following DAX formula:

Avrg 6M = 
CALCULATE(
    [Measure],
    DATESINPERIOD(
       Calendar[Date],   
        EOMONTH(TODAY(),-1),
        -6,
        MONTH
    )
)

Hope this helps.

View solution in original post

3 REPLIES 3
rajulshah
Solution Sage
Solution Sage

Hello @setis,

Please try the following DAX formula:

Avrg 6M = 
CALCULATE(
    [Measure],
    DATESINPERIOD(
       Calendar[Date],   
        EOMONTH(TODAY(),-1),
        -6,
        MONTH
    )
)

Hope this helps.

View solution in original post

It does. Thank you very much!

@setis, if this solution helped, please mark it as 'Accepted' so that it helps others.

Thanks 🙂

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.