title: Power BI date range custom column for filter
body: <p>I have a calendar table in Power BI linked to two other tables, one with occupancy by date and another with predicted occupancy by date.  The second table goes well into the future.</p>
  <p>I want the report to have a rolling 15 day range, 7 days prior to today and 7 days into the future.  I tried to create a custom column using:</p>
  <p>ReportRange = IF(DATESBETWEEN (Calendar[SQL_Date], (TODAY()-7), (TODAY()+7)),1,0)</p>
  <p>I get a response &quot;No syntax errors have been detected.&quot;
  <a href="https://i.stack.imgur.com/Ymfmr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ymfmr.png" alt="No syntax error" /></a></p>
  <p>But when I click &quot;OK&quot;, I get a yellow bar/warning:
  &quot;Expression.Error: The name 'IF' wasn't recognized.  Make sure it's spelled correctly.&quot;</p>
  <p>Can anyone help with this?
  Thanks!</p>