title: MDX YTD calculated measure
body: <p>I'm still new to MDX and I'm trying to get some basic functions to work in my SSAS cube. Can you guys point out what I'm doing wrong here? I've added a calculated measure to my cube with the following code:</p>
  
  <pre><code>CREATE MEMBER CURRENTCUBE.[Measures].[Amount YTD]
  AS
    AGGREGATE(
      YTD([OrderDate].[Calendar].CurrentMember)
     ,[Measures].[Amount]),
  VISIBLE = 1, ASSOCIATED_MEASURE_GROUP = 'MyMeasureGroup';
  </code></pre>
  
  <p>After that I'm trying to get some data going...</p>
  
  <pre><code>SELECT 
  NON EMPTY
  {
    [Measures].[Amount]
  , [Measures].[Amount YTD]
  } ON COLUMNS,
  NON EMPTY
  {
    [OrderDate].[Month].ALLMEMBERS *
    [Product].[Product Group].ALLMEMBERS 
  } ON ROWS
  FROM (SELECT ([OrderDate].[Year].&amp;[2014-01-01T00:00:00]:
                [OrderDate].[Year].&amp;[2015-01-01T00:00:00]) ON COLUMNS
  FROM [SalesOrderIntake])
  </code></pre>
  
  <p>This is the output I'm getting:</p>
  
  <p><a href="https://i.stack.imgur.com/lgVKa.png" rel="noreferrer"><img src="https://i.stack.imgur.com/lgVKa.png" alt="Query result"></a></p>
  
  <p>I'm not seeing any errors in my Output messages, which makes it difficult for me to figure out what is acting up. Hoping you guys can help me out on this one.</p>
  
  <p>FYI: the actual select is just for testing purposes. I just want to get that YTD running. I've tried several things and it always comes out empty, so I was hoping to get some actual errors if I would query it directly in SSMS instead of using a BI tool. Also, the OrderDate dimension is a generated Time dimension which was provided to me by VS.</p>