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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Rolling 6 months

Hi Experts

 

Trying to work out the rolling 6 months to start at a specific date in my table - my measure is (but i cannot see the error)

 

Rolling 6 mnth = 
VAR _Min = Min(BM Historic[Month Year])

BAR _Startdate = Edate(_min,48)

Return

Calculate(Sum(BM Historic [Value]),Max(_startdate),-6,month))

1 ACCEPTED SOLUTION
selimovd
Super User
Super User

Hey @Anonymous ,

 

I didn't understand your DAX measure and I also think it can't work as there are some errors.

If you want to get rolling 6 months data, you should try the following approach:

Rolling 6 mnth =
CALCULATE(
    Sum('BM Historic'[Value]),
    DATESINPERIOD(
        'DateTable'[Date],
        MAX('DateTable'[Date]),
        -6,
        MONTH
    )
)

 

Be aware, that you need a proper date table in order for the time intelligence functions to work.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

4 REPLIES 4
selimovd
Super User
Super User

Hey @Anonymous ,

 

I didn't understand your DAX measure and I also think it can't work as there are some errors.

If you want to get rolling 6 months data, you should try the following approach:

Rolling 6 mnth =
CALCULATE(
    Sum('BM Historic'[Value]),
    DATESINPERIOD(
        'DateTable'[Date],
        MAX('DateTable'[Date]),
        -6,
        MONTH
    )
)

 

Be aware, that you need a proper date table in order for the time intelligence functions to work.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 
Anonymous
Not applicable
Anonymous
Not applicable

Hi Denis, What i was trying to do is start my rolling 6 months from date index number 25 which is Feb 2017 and ignore all dates before this date..... Is this possible?

Hey @Anonymous ,

 

I don't know what you mean with index number 25 as that's also not in your file.

But you can set the date in the measure above. Instead of "MAX('DateTable'[Date])" you can also just write "DATE( 2017, 2, 25)" as start date.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Helpful resources

Announcements
Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.