title: SSAS How to scope a calculated member measure to a number of specific members?
body: <p>I'm trying to create a calculated member measure for a subset of a group of locations. All other members should be null. I can limit the scope but then in the client (excel in this case) the measure does not present the grand total ([Group].[Group].[All]). </p>
  
  <pre><code>CREATE MEMBER CURRENTCUBE.[Measures].[Calculated Measure]
   AS (
       Null
      ),
  FORMAT_STRING = "$#,##0.00;-$#,##0.00", 
  NON_EMPTY_BEHAVIOR = { [Measures].[Places] } 
  ,VISIBLE = 1 ,    ASSOCIATED_MEASURE_GROUP = 'Locations';
  
  -----------------------------------------------------------------------------------------
   SCOPE ({([Group].[Group].&amp;[location 1]),
          ([Group].[Group].&amp;[location 2]),  
          ([Group].[Group].&amp;[location 3]),
          ([Group].[Group].&amp;[location 4]),
          ([Group].[Group].&amp;[location 5])
          }, [Measures].[Calculated Measure]);
  
  // Location Calculations 
  
  THIS = (
        [Measures].[Adjusted Dollars] - [Measures].[Adjusted Dollars by Component] + [Measures].[Adjusted OS Dollars]
      ); 
  
  END SCOPE;
  </code></pre>
  
  <p>It's as though the [Group].[Group].[All] member is outside of the scope so it won't aggregate the rest of the members. Any help would be appreciated.</p>