title: SQL Server SSAS Calculated Measure with DateDiff
body: <p>I'm trying to create a calculated member in SSAS using the datediff function, but can't seem to get it working at all.</p>
  
  <p>The requirement is as follows,
  <br>
  datediff(day, XDate where Type = 2 AND Status IN (1,2,3), XDate where Type = 3)</p>
  
  <p>I'm not sure on how to translate that to the proper MDX for a calculated measure in SSAS.</p>
  
  <p>Any help is greatly appreciated.</p>