I'm having a hard time trying to produce the last 4 quarters from DateTimeNow(). I'll have to use the 4 quarters in the column name and also as a counter.
I found this in our community:
IF ceil(DateTimeMonth(DateTimeNow())/3)!=1 then
'Q'+tostring(ceil(DateTimeMonth(DateTimeNow())/3)-1)+tostring(DateTimeYear(DateTimeNow())-2000)
else 'Q4'+tostring(DateTimeYear(DateTimeNow())-2000-1) endif
But it doesn't work well past the previous quarter.
Any help would be appreciated.