Hello,
there is surely a better way to do it.. but it's the only one I know ...
here an example, just replace Education level by your GroupID dimension
With member [Education Level].[Group 1 SUM] AS 'SUM({[Education Level].[All
Education Level].[Bachelors Degree],[Education Level].[All Education
Level].[Graduate Degree]})'
member [Education Level].[Group 2 SUM] AS 'SUM({[Education
Level].[All Education Level].[High School Degree],[Education Level].[All
Education Level].[Partial College]})'
member [Education Level].[Total] AS 'SUM({[Education Level].[Group 2
SUM], [Education Level].[Group 1 SUM]})'
SELECT {[Education Level].[All Education Level].[Bachelors
Degree],[Education Level].[All Education Level].[Graduate Degree],
[Education Level].[Group 1 SUM],[Education Level].[All Education
Level].[High School Degree],[Education Level].[All Education Level].[Partial
College], [Education Level].[Group 2 SUM], [Education Level].[Total] } on
rows, {[Measures].[Store Cost]} on columns from sales
HTH
Patrice Lamarche
"Espen Johnsen" <news (AT) REMOVETHIS (DOT) espenjohnsen.com> wrote
Quote:
Hi!
Is there a way you can calculate SUM's in the middle of a mdx result
set?
Here is my example data:
GroupID Name Value
1 MyTest1 1260
1 MyTest2 18220
2 MyTest3 130
2 MyTest4 11540
And here is what i want the mdx to return:
Name Value
==============
myTest1 1260
myTest2 18220
Group 1 SUM 19480
myTest3 130
myTest4 11540
Group 2 SUM 11670
Total SUM 31150
Is this posible with native MDX?
Espen Johnsen |