Hi
Try IIF() instead of IF() and the syntax should be fine.The only trick you
must be aware of using the IIF() function, is that it should return either
two strings, or to numeric values, but not a mix of both.
Now if this is the LEVEL name that you want to test the first argument would
read [Store].CurrentMember.Level.Name.
Also keep in mind that it is often more efficient and easier to maintain no
to rely on the object's names (because they can vary over time).
Here you could for instance use the .Ordinal method instead of .Name to get
the 0-based number of the level within the hierarchy. Also, you could use
the IS operator instead of = to test the object itself, not it's properties.
Regards
Olivier.
"Granville" <granville (AT) ananzi (DOT) co.za> wrote
Quote:
Hi there
if([Store].currentmember.name = "Store Name", null,
[measures].[Price])
In this sample script I want to say if the level is "Store
Name", calculate Price ...but I get a syntax error, how
would I can I fix it?
Granville |