Forum Discussion

UK_User123456's avatar
UK_User123456
Resolver I
3 years ago

rolling 12 months

Hi All,

 

Im looking at doing a rolling 12 months total.

I have a list of employee id's and I have done a count of these then used the calculate to give me the max date, however when I put this into a matrix table  it gives me the count of the number of employee id's but what I really need is to show that if I am reporting for June 23, it should then show me the total number of employees we had going from June 23 back 12 months, May 23 going back 12 months etc... but its not.

 

Employee ID       Left Date    

1                          16/08/2022

2                           17/08/2018

3                           01/09/2022

4                           02/05/2023

5                           03/11/2022

6                           15/05/2023

7                           27/04/2015

8                           16/06/2020

 

I used the following calculation:

 

Last 12 months rolling =

    CALCULATE(SUM(Headcount[Employee Id]),

        DATESINPERIOD(Leavers[Left Date],

            MAX(Leavers[Left Date]),

                -12,

                    MONTH

                    )

                )

 

Any help would be amazing.

 

Thanks in Advance!

2 Replies

  • Greg_Deckler Many thanks for your response, but it didnt really resolve the issue. 

     

    I dont know if its possible, but if I use a bar graph as an example, and had 12 months worth of data bars, I would then look at Jul 23, that bar for Jul 23 should be a sum of the last 12 months in the 1 bar, then in the bar for May 23, it would be the sum of the last 12 months in that one bar etc.... so for each bar in the graph would be the sum up of that month plus the prior 12 months from that point in the month.

     

    Hope that makes sense.