Advertisement

07.11.2005 at 02:55AM PDT, ID: 21486856
[x]
Attachment Details

OLAP Get an average of measures per sub-dimension

Asked by paulleahy in MS SQL Server, Measurement Industry

Tags: ,

Hi all
I've got a real brain twister for you.

I'm building an OLAP cube (first timer) and it uses two measures; for example items and sales.
Each of the item/sales figures are added at the first of each month, so,
 the smallest time dimension is: the 'First of the month',
 drill up its parent dimension: 'Quarter',
 drill up again to the: 'Year' dimension.

There are other dimensions: 'Customer', 'ProductType' and ItemType and they also drill down to more specific information but I don't think the problem is to do with them.

I need to be able to display the average items and sales for the previous three time measures for example: at month level: say for April; display information for Jan, Feb and Mar, at year level display average for the previous three years.

I came up with a SQL query to calculate the average for the previous three months and I was going to use this as another measure but then I was hit by the fact that the cube will be display the measures at a customer level and also an itemId level and by any other dimension and their drill downs.
This would mean the average for the previous three months for a particular customer or a certain ItemId etc.

Can anyone point me in the right direction I'm stuck between trying to solve the problem at the cube level (involves learning MDX) or finding a SQL query for a measure that satisfies the the cube/ three month average problem..

Any help would earn my eternal gratitude and respect.
 


Start Free Trial
[+][-]07.11.2005 at 03:31AM PDT, ID: 14410928

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.11.2005 at 03:55AM PDT, ID: 14411022

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.11.2005 at 04:29AM PDT, ID: 14411205

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: MS SQL Server, Measurement Industry
Tags: sql, average
Sign Up Now!
Solution Provided By: Hilaire
Participating Experts: 2
Solution Grade: C
 
 
[+][-]07.11.2005 at 06:06AM PDT, ID: 14411847

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.11.2005 at 06:11AM PDT, ID: 14411883

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.26.2005 at 12:34AM PDT, ID: 14524621

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32