The syntax of the the ago function as documentation in Answers is:
AGO(expr, time_level, offset)
However, as with the administration tool, there is a overloaded version of AGO:
which uses the grain of the Answers query as the level.
As an example using Sample Sales lite the function AGO("Base Facts"."Target Revenue",1) gives the revenue one time period ago. If the report is at the year level then that will of course be one year ago:
What I don't like about the feature is that there is no way to select the time level - this is really user unfriendly and not at all intuitive. It seems rather half done.
If like me you tried the dimesnion and got the error nQSError: 27037, the syntax is to use the time hiearchy level:
AGO("Base Facts"."Revenue", "Time"."Time Hierarchy"."Year", 1)
Note the time hierarchy needs to be exposed to the presentation layer.
This way you can have a report at say quarter level and compare the revenue of a year ago quarter by quarter: