SQL reporting help needed

RedChief

Senior member
Dec 20, 2004
533
0
81
So I have a bunch of usage data. This data is broken down by customer and by period.

For example customer A has a usage amount of 330 between 3/15/09 and 4/13/09 (dates are stored in both mm/dd/yyyy format and Year/day of year format (so 3/15/09 would be 2009074)).

Now the date period varies from one customer to another and the length can vary from 4 to 45+ days.

Each customer has a cutoff date. With that cutoff date, I need to know the average usage for the 6 30day periods before the cutoff and the 6 30day period after the cutoff.

Any suggestions on the route I should go here? Anything in the OLAp/Analysis Services that can help?
 

imported_Dhaval00

Senior member
Jul 23, 2004
573
0
0
I am sure if you post more details, folks here will be able to come up with effecient queries. I am alluding ot the structure of your tables.

Also, you mentioned OLAP/SSAS - are you working on a cube, and you are struggling with MDX queries? Again, please post the details of your backend schemas.