Hi,
I'm trying to make a calculate member using this script:
Code Snippet
iif([Stores].[Store Name].CurrentMember.level is [Stores].[Store Name].[(All)],
sum(
(FILTER(
descendants([Stores].[Store Name], [Stores].[Store Name]),
(([Stores].[Store Name].currentmember, [Measures].[S v net price budget]) <> 0)
), [Measures].[S v net price disc])),
[Measures].[S v net price disc])
but the total generated is always the same as if I made a sum for the [Measures].[S v net price disc].
I checked folowing:
Code Snippet
with member measures.test1 as sum(FILTER(
descendants([Stores].[Store Name], [Stores].[Store Name]),
[Measures].[S v net price budget] <> 0)
, [Measures].[S v net price disc])
select
measures.test1 on 0,
[Dates].[Date].[Month Desc].&[09/2007] on 1
from sales;
Code Snippet
select
([Stores].[Store Name], [Measures].[S v net price disc]) on 0,
[Dates].[Date].[Month Desc].&[09/2007] on 1
from sales;
it gives the same result, but the:
Code Snippet
select
(FILTER(descendants([Stores].[Store Name], [Stores].[Store Name]), [Measures].[S v net price budget] <> 0), [Measures].[S v net price disc]) on 0,
[Dates].[Date].[Month Desc].&[09/2007] on 1
from sales;
has 92 colums, and:
Code Snippet
select
(descendants([Stores].[Store Name], [Stores].[Store Name]), [Measures].[S v net price disc]) on 0,
[Dates].[Date].[Month Desc].&[09/2007] on 1
from sales;
has 146 colums.
So the totals should be different.
I have been trying many different scripts and the result was always the same, so if You have any idea how to make it work, help me !!!
Thanks,
Micha?
Assuming you're using AS 2005, it may be worth explictly specifying member and level in Descendants(), rather than relying on hierarchy defaults - does that make any difference?
Descendants([Stores].[Store Name].CurrentMember, [Stores].[Store Name].[Store Name])
No comments:
Post a Comment