title: Calculated member expression in SSAS 2008
body: <p>I need to create a calculated member to a cube to show me the total amount due invoices for each customer less than or equal to 60 days.</p>
  
  <p>I understand that I can find the current date minus the date of the invoice and, if the result in days, is less than or equal to 60, then make the sum of all invoices for each customer.</p>
  
  <p>I don't khow how implement this into the expression for a calculated member. I have done this, but I get error in the <code>SELECT</code> and I don't know why: </p>
  
  <pre><code>CREATE MEMBER CURRENTCUBE.[Measures].[Importe60]
  AS Sum([Measures].[Importe de la factura])
  
  SELECT [Measures].[Importe60] ON COLUMNS,
  [Clientes].[Nombre].Members ON ROWS
  FROM CuboVentas
  WHERE DateDiff(dd,[Facturas].[Fecha Factura],getDate())&lt;=60,
  
  VISIBLE = 1, ASSOCIATED_MEASURE_GROUP = 'Facturas clientes';
  </code></pre>
  
  <p>Does anyone know what I'm doing wrong?</p>