0

I tried to create a calculated member for displaying profit for each product, but I got an error on the "select". Can anyone help me out with this since I am newbie in this?

CALCULATE;  
CREATE MEMBER CURRENTCUBE.[Measures].Profit_Per_Produkt
 AS Select [Measures].[Vinst] on columns,
[Dim Produkt].[Artikelnr].[Artikelnr] on rows
from [Elektronikkedja], 
FORMAT_STRING = "Percent", 
VISIBLE = 1 ,  ASSOCIATED_MEASURE_GROUP = 'Fact Köp' ; 
jcjr
  • 1,503
  • 24
  • 40
Palmer
  • 493
  • 4
  • 13
  • 1
    It looks like you're trying to create a calculated _member_ that isn't a member but a 2D slice of the cube. A member must be an expression that yields a single value. – Will A Dec 09 '12 at 16:04

1 Answers1

0

A calculated member you should contains a calculate expression as:

([Measures].[Internet Sales-Sales Amount] - 
[Measures].[Internet Sales-Total Product Cost]) /
[Measures].[Internet Sales-Sales Amount]

See on technet Defining Calculated docs a some samples.

dani herrera
  • 48,760
  • 8
  • 117
  • 177