Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

to get Last 8 quarters of data

Hi All,

I have one requirement where i have to get the data for last 8 quarters excluding current quarter.

i googled and referred some docs but i am getting issue because my fiscal year starts from October.

Could you please anybody help me on this?

Thanks,

Chiru

4 Replies
Anonymous
Not applicable
Author

In this case , it doesn't matter when the year start, since you're looking at the time period related to the current date, not to the fiscal year start.  Assuming your calendar has fields DateID and Quarter, it would be:

LEFT JOIN (Calendar) LOAD

     DateID,

     Quarter as "Last 8 Quarters"

WHERE DateID < quarterstart(today())

and DateID >= quarterstart(today(),-8);

Not applicable
Author

Hi Michael,

Thanks for

Actually my fiscal year will start from November(by mistake i typed as Oct).

Now we are in July (as per my fiscal year it is 2015Q3).

Now i have to show the data for 2015Q2,2015Q1,2014Q4,2014Q3,2014Q2,2014Q1,2013Q4,2013Q3,2013Q2.

Thanks,

Chiru

Anonymous
Not applicable
Author

As I said before, the fiscal year start doesn't matter for your request to find the last eight quarters.  The last quarter is still the last quarter, no matter how you name it.

nagaiank
Specialist III
Specialist III

You may try the following

WHERE DateID < quarterstart(today(),0,11)

and DateID >= quarterstart(today(),-8,11);