Hi,
Considering these data, which shows turnover per Salesmen/region
I created different named sets such as :
CREATE SET CURRENTCUBE.[Without F Region]
AS {EXCEPT([Region].[Region Code].[All].Children,
[Region].[Region Code].&[F])};
CREATE SET CURRENTCUBE.[SalesMan1]
AS {EXCEPT([Sales Force].[SalesMan].[All].Children,
[Sales Force].[SalesMan].&[SalesMan1])};
Using those named sets I would like to define a measure that will show the turnover for region A B C D E and SalesMan1 ...
I tryed different syntax
SUM(([Without F Region],[SalesMan1]),[Turnover])
SUM(Crossjoin([Without F Region],[SalesMan1]),[Turnover])
but I cannot get it work. The total is correct, but using dimension, the result is not splited.
Any idea ?
Regards
Ayzan
The problem is that the named sets are evaluated before the context is set in the query.
If you are using AS2005 you could force the context to be re-evaluated with the EXISTING statement
eg
SUM(Crossjoin(EXISTING [Without F Region], EXISTING [SalesMan1]),[Turnover])
|||
Thank you for your reply.
It works perfectly.
Regards
Ayzan
No comments:
Post a Comment