title: SSAS - Aggregation issue with “Not-applicable” members that needs to be excluded from the “Grand Total” in Excel
body: <p>We’ve build a Finance OLAP Cube in SSAS which is mostly used/browsed by Accountants. Due to a “self-service” policy that is followed, users are in the meantime required to make use of Excel (with a data connection to the cube) as their reporting and/or analysis tool.</p>
  
  <p>One of the dimensions, the Accounts dimension, contains the full list of accounts including a Chart of Accounts hierarchy. After the initial launch of the cube, users started to request alternative/custom Account hierarchies to cater for their reporting.</p>
  
  <p>Most of these <strong>requested hierarchies</strong> (apart from the Chart of Accounts hierarchy) contain only a <strong>portion of the full list accounts</strong> e.g. Management Expense Hierarchy.</p>
  
  <p>The <strong>initial approach</strong> was to create e.g. a Management Expense Hierarchy within the Accounts dimension with  a “not applicable” attribute name for the non-management expense accounts. Users then needed to deselect the “<em>not applicable</em>” name from the “Management Expense Hierarchy” Pivot Field List in Excel whenever they dragged this hierarchy into the “rows” field.  Not all users were satisfied with this option and requested that they only wanted to see the relevant accounts without deselecting items which lead us to utilize the attribute hierarchy select/deselect members of the Dimension Data section from <em>Roles</em> – which was not a successful.</p>
  
  <p>The <strong>next approach</strong> was to utilize the <em>Dimension Hierarchy Level Property</em> – <strong>HideMemberIf</strong>  “<strong>No Name</strong>” in order to show only the relevant Expense Management hierarchy levels/members and hide the non-management expense accounts.
  This was achieved by creating a dimension called “Management Expenses” and adding an additional foreign key column in the fact table with a relationship to the Management Expense dimension. The non-management expense accounts were populated with a <em>-1</em> key and a <em>NULL</em> attribute name.</p>
  
  <p>The desired results were achieved in Excel with the HideMemberIf  “No Name” BUT the “<strong>Grand Total in Excel</strong>” still shows the <strong>sum of ALL accounts</strong></p>
  
  <p><a href="https://i.stack.imgur.com/vU5eI.jpg" rel="nofollow noreferrer">Excel Hierarchy Example</a></p>
  
  <p>Any suggestions in order to resolve the “Grand Total” issue – i.e. <strong>to exclude the -1 entries</strong> also … will be much appreciated.</p>