MDX script that calculates the metric base on the value of the dimension attribute member

novelty in MDX scripts and I'm trying to create a calculated measure that calculates the price base based on the package type. Using this mdx script, I return 0 total in Excel connected to the analysis database.

with MEMBER [Measures].[Price] AS
WHEN [Product].[Package].CURRENTMEMBER.member_key = "S"
then [Qty]* 150
WHEN [Product].[Package].CURRENTMEMBER.member_key = "M"
then [Qty]* 300
enter the description of the image here