0
votes

i am hoping you can improve the 'love' side of my love-hate relationship with MDX.

so, say i have a cube of sales with dimensions customer, year, month, week, product. i have calculated measure based on certain customer values. that is, the calculation is based on sales for customer X in month Y, and then other customers (same calc, maybe different month, etc), added together. basically, these are 'key' customers that have been identified as leading indicators, and the calculated measure is needed for other comparisons as a measure.

now, when i do analysis by year, month, or customer, all is great. the numbers look good and the calculation is doing what i want it to.

however, when i do analysis by week or product, this calculation presents numbers that, at first, don't look sane. i have researched the math, and I understand why it's showing what it is. not all products sell every month to all customers, or each week, etc.

so, what i would like to do in the case of say, analysis first by month, then by week or product, is show the month value as if there were no further breakout by product (or week), just the same calculation value as if the analysis "stopped" at the month level.

i have researched the mdx function reference and found some ideas, but testing has thus far provided nothing useful, so i'm not even sure i'm conceptualizing the problem correctly. i'm hoping someone can point me to the correct function or syntax, and give me an example as a starting point.

if there is any info missing, let me know and I will be happy to clarify or add to my question.

1
Can you post your current attempt at the MDX calc?GregGalloway

1 Answers

0
votes

Danylo was correct. i was looking for an All() (function) when i needed the All member.

here is what worked:

    sum(
    (
        [Time].[Week].[All],
        [Product].[Product Number].[All],
        [Time].[Month].[All].[Y],
        [Customers].[Customers].[All].[X]
    ),Measures.[Sales]
   ) 
+ ... repeat ....

Thanks for the help!!