Forum Discussion

powerbiexpert22's avatar
powerbiexpert22
Icon for Impactful Individual rankImpactful Individual
2 years ago
Solved

rolling 6 month calculation

i want to calculate rolling 6 months sum between 21st Feb 2024 until current date

if i use DATESINPERIOD() function as shown below then it is creating dates starting from 01st March 2024 which is not correct , I want date to start from 21st Feb 2024 rather than 1st March 2024

DATESINPERIOD(Calendar_2[Date],MAX(Calendar_2[Date]),-6,MONTH)
current results:

 

expected results:

 

 

 

 

 

  • powerbiexpert22 

    that's because if you count from 1st Feb, the number of months from Feb to Aug is 7. 

    That's why when you count for the last 6 month, the starting date will be 1st Mar. 

    Mar to Aug contains 6 months.

1 Reply

  • powerbiexpert22 

    that's because if you count from 1st Feb, the number of months from Feb to Aug is 7. 

    That's why when you count for the last 6 month, the starting date will be 1st Mar. 

    Mar to Aug contains 6 months.