dbTalk Databases Forums  

Cube definition/MDX Query help needed

comp.databases.olap comp.databases.olap


Discuss Cube definition/MDX Query help needed in the comp.databases.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bent Jensen
 
Posts: n/a

Default Cube definition/MDX Query help needed - 09-28-2005 , 03:44 AM






Hi all

I am new to MDX and I have a problem getting the wanted output.

Here is the deal.

The dataset looks like this (Simplified)

Customer Group, Customer, Week, AccumSales


The Output I want is this:

a.. Customer Group 1 Accum Sales 6500 (Sum of Last of
Accum sales)
a.. Customer 1 Accum Sales 3000 (Last of Accum
sales i.e. Week 3)
a.. Week 1 Accum Sales 1000
b.. Week 2 Accum Sales 2000
c.. Week 3 Accum Sales 3000
b.. Customer 2 Accum Sales 3500 (Last of Accum
sales i.e. Week 3)
a.. Week 1 Accum Sales 1500
b.. Week 2 Accum Sales 2500
c.. Week 3 Accum Sales 3500

The trick here is to sum up values in AccumSales but only if Week is the
last one within the customer.

How do I do this?

I know it is a bit weird to have AccumSales in a field in the dataset, but
this is how it is - Please do not ask me to change it :-)


Thanks


Bent



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.