Here is OLAPTimeDimension to the rescue. It can be introduced as any other dimension in the OLAPCube schema and then configured to return year, half year, quarter, month and day in any combination.
<mx:OLAPCube id="salesCube" >
<mx:OLAPDimension name="SalesData" >
<mx:OLAPAttribute name="Company" dataField="company" />
<mx:OLAPAttribute name="Region" dataField="region" />
<mx:OLAPAttribute name="Market" dataField="market" />
<mx:OLAPAttribute name="Product" dataField="product" />
<mx:OLAPHierarchy name="Region-Market-Store" >
<mx:OLAPLevel attributeName="Company" />
<mx:OLAPLevel attributeName="Region" />
<mx:OLAPLevel attributeName="Market" />
<mx:OLAPLevel attributeName="Product" />
</mx:OLAPHierarchy>
</mx:OLAPDimension>
<local:OLAPTimeDimension name="Years" dataField="date" />
<mx:OLAPMeasure name="Revenue" dataField="revenue" />
</mx:OLAPCube>
Using this we get the following result where in we can query revenue for different years.
It can be easily extended to query quarters and months by setting includeQuarter and includeMonth to true on OLAPTimeDimension. The source is here.