I am working on ms analysis services..


In my calculated cell, I have a metric called
==Percentage of spend

and I have three measures
Plan, Actual, Forecast

I want to do the following.

If the mesaure is Plan, I dont want to calculate
anything. But if it is actual or forecast then I will
give a formula to run.

The formula is
IIF([Measures].CurrentMember.Name = "Plan",
([Measures].CurrentMember.Value),
(IIF(([Spend Metric].&[Material
Purchases]=0),Null,[Spend Metric].&[Material Purchases
via WebPO]/[Spend Metric].&[Material Purchases])))

But I get an error, can you figure out why...
Help me how to do it..