title: Can this MDX be optimized?
body: <p>I have a MDX query as below:</p>
  
  <pre class="lang-sql prettyprint-override"><code>WITH
  MEMBER [Measures].[Percentage of All Accounts] AS [Measures].[SUM Principal EUR]/SUM({[Contract].[Product Group].&amp;[P1], [Contract].[Product Group].&amp;[P2], [Contract].[Product Group].&amp;[P3]}, [Measures].[SUM Principal EUR])
  SELECT
      NON EMPTY
      {
          [Measures].[SUM Principal EUR],
          [Measures].[SUM Principal USD],
          [Measures].[SUM Principal Local Currency],
          [Measures].[Percentage of All Accounts]
      } ON COLUMNS,
      NON EMPTY
      { (
          [Contract].[Product Group].ALLMEMBERS,
          [Dates].[YearMonth].ALLMEMBERS
      ) } ON ROWS
  FROM 
  (
      SELECT
      { (
          STRTOSET(@ContractProductGroup, CONSTRAINED),
          STRTOSET(@DatesYearMonth, CONSTRAINED)
      ) } ON 0
      FROM [Assets]
  )
  WHERE
  {
      { [Contract].[Unit].&amp;[U1], [Contract].[Unit].&amp;[U2], [Contract].[Unit].&amp;[U3] },
      [Assets Cont].[Contract Status].&amp;[C1]
  }
  </code></pre>
  
  <p>Can this be optimized?</p>
  
  <p>I know that you cannot run it on your machines, but I want to know is there something in this query that is not a good practice or it could be done better.</p>