Hi There,
I am trying to create a rolling 12 month query for 24 months worth of data where each Period returns the sum of the last 12 months of data. My current SQL is as follows:
SELECT qryGroupedNewClm.Period,
Sum(IIf([Department]="Property" And [Claimsize] In ("WL","NPS"),1,0)) AS PropWLNPSClmCount,
Sum(IIf([Department]="Property" And [Claimsize] In ("LL","NPL"),1,0)) AS PropLLNPLClmCount
FROM qryGroupedNewClm
GROUP BY qryGroupedNewClm.Period;
This returns a count of claims in that period only - how do I get the query to sum the rolling 12 and display this per period?
Please help! thanks!
I am trying to create a rolling 12 month query for 24 months worth of data where each Period returns the sum of the last 12 months of data. My current SQL is as follows:
SELECT qryGroupedNewClm.Period,
Sum(IIf([Department]="Property" And [Claimsize] In ("WL","NPS"),1,0)) AS PropWLNPSClmCount,
Sum(IIf([Department]="Property" And [Claimsize] In ("LL","NPL"),1,0)) AS PropLLNPLClmCount
FROM qryGroupedNewClm
GROUP BY qryGroupedNewClm.Period;
This returns a count of claims in that period only - how do I get the query to sum the rolling 12 and display this per period?
Please help! thanks!