title: How to do YTD, MTD calculations based on the Today()
body: <p>I am very new to SSRS, I have below scenario.</p>
  
  <p>I have to calculate measures for YTD, MTD, Last 7 Days and Previous day based on the <code>today()</code>.  I need to use these YTD, MTD, Last 7 days and Previous day variables in the calculations while writing the IIF syntax</p>
  
  <p>For example:</p>
  
  <pre class="lang-vb prettyprint-override"><code>sum(IIF(Year="this year is Year to Date", value, sales)
  
  sum(IIF(CreatedDate="the last 30days values ",sales)
  </code></pre>
  
  <p>Can any one please tell me how to achieve this</p>
  
  <p>Thanks</p>