Search code examples
ssasmeasure

MS Analysis Services - Calculated measure in measure group


In my cube I have defined a calculated measure as the sum of two other measures. How can I make this measure show up in one of my measure groups?


Solution

  • Within your cube script where the calculated measure is defined, like so:

    CREATE MEMBER CURRENTCUBE.[Measures].[Calculated Measure] AS ([Measures].[Measure 1] / [Measures].[Measure 2]), FORMAT_STRING = "Percent", NON_EMPTY_BEHAVIOR = { [Measure 1], [Measure 2] }, VISIBLE = 1 , DISPLAY_FOLDER = '\Custom Folder' , ASSOCIATED_MEASURE_GROUP = 'Custom Measure Group';

    The properties relevant to your question are in bold.