Thanks for the feedback. I ended up with a solution that works for me but is possibly not the most elegant way - it came while making boxes for board game components so the totally different task I think ley my brain come up with a solution.
What I have done is taken the current months data out and then joined, based on the Person Ref. I have then calculated the difference between the event dates and if this is between 1 and 365 put in a 1, else 0. I then groupby the Event Ref and sum the 0/1s to count how many previous events in the last 12 months - I can join this back up with my original data. It works, and is quick enough for my needs currently so will try and keep things simple for myself for now.
Thanks for the feedback and ideas.
