-
Summing NamedSets Help
Hi,
I have created several named sets.
I need to find the percentage of sales of one named set over the sum of all sales for all named sets.
Looking like this in pseudo code:
Jan1, Sales, NamedSet1
-----------------------
Jan1, Sales, NamedSet1+NamedSet2+NamedSet3
Here is some mdx that works EXCEPT for the SumOfSets:
with
member Measures.SumOfSets as '([Measures].[Sales], {NamedSet1+NamedSet2+NamedSet3})'
select
{[Measures].[Sales], Measures.SumOfSets}
on 0,
CROSSJOIN ( {[TimeYMD].[All TimeYMD].[2009].[January]:[TimeYMD].[All TimeYMD].[2009].[March]}, [MediaChannels].[Vendors])
on 1
from (
select [NamedSet1] on 0 from rebills
Thanks all!
Richard
-
found answer
Hi,
I found this solution:
with
member measures.NewSet as 'AGGREGATE({[ChartAffiliate],[ChartOrganic]}, [Measures].[Sales])'
SELECT NON EMPTY { [Measures].[Sales] , measures.NewSet }
ON COLUMNS,
which gave me the numerator and the denominator respectively.
But if anyone has a better way please let me know.
Richard
-
I Prefer Your Ultimate Solution to That Which You Originally Sought ...
I prefer your ultimate solution to that which you originally sought ..... Mainly because it actually uses the dimensional structure (dims across measures, etc.) versus using Named Sets - which, in my experience, are best leveraged as framers of dims for presentation purposes, groupings that may go beyond the dimensional structure, and the like.
Accumulation is best done with measures / calculated members, and then the dims (even within Named Sets) can simply be juxtaposed to give the correct values / aggregations.
We appreciate your sharing your solution, though ... that way, others with similar needs / questions might benefit! Let us know if we can offer further assistance or insight.
Good Luck,
Bill
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|