I like your interpretation 'for the twelve months THAT ended. ', which seems accurate to me, and is probably why 'ended' appears more often. The rationale for 'ending', I suppose, is that the data are being analyzed now and/or that the data and period remain valid now, and 'ending' might be re-phrased as 'for the twelve months that END August 2004'.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.