Quantcast
Channel: SQL Server Analysis Services Forum
Viewing all articles
Browse latest Browse all 2472

MDX calculation versus new Dimension attribute

$
0
0

Hi,

I have implemented a Product dimension sharing a lot of characteristics with the Adventure Works 2008 R2 sample and is a slowly changing dimension.

One problem that I can't seem to get my head around, is when I am querying the cube via MDX, how would I go about aggregating against the Product code directly?  The following should highlight what I mean:

select

NON EMPTY {[Measures].[Sales Amount],[Measures].[Internet Sales Amount], [Measures].[Internet Tax Amount]}on columns,

NON EMPTY { {[Product].[Product].&[223],[Product].[Product].&[224], [Product].[Product].&[225]}}on rows
from
[Adventure Works]

The rows are the 'AWC Logo Cap' Product.  What I dont understant is how to reduce this into 1 row and aggregate all the numbers together e.g. group by Product. e.g. the Sales Amount would be 51k for all time.

Can I tweak the definition of my Product dimension for this? Can i do this in a calculated member, or both?

It seems reasonable for my particular end users to ask questions such as "what is the sum of commission for Product code 'X' ?"

Am hoping that I missed something obvious.

Thanks in advance.

MrPeds


Database and Application Developer


Viewing all articles
Browse latest Browse all 2472

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>