title: Need to limit the current date by the end of previous month in Power BI Slicer
body: <p>I have a report in Power BI Desktop, with the slicer - YearMonthSort - which has data selection by Year-Month</p>
  
  <p>Plz, see the screenshot below:</p>
  
  <p><a href="https://i.stack.imgur.com/KrznO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KrznO.png" alt="enter image description here"></a></p>
  
  <p>My goal is to limit data in this slicer as - <strong>to the end of previous month</strong>.</p>
  
  <p>For example, if today is 8/21/2019, I need my Report to show data until  07/31/2019. </p>
  
  <p>And, since I have it in the "Year-Month" format, it should be limited (displayed as <strong>2019-07</strong>) </p>
  
  <p>When I needed to limit this slicer by today's date I used </p>
  
  <pre><code>IsToday = SWITCH (TRUE (),'Dimension Date'[Date] &lt;= NOW (), 1, 0) 
  </code></pre>
  
  <p>(by StackOverflow advice)
  What, if I need it to be limited until the last day of the previous month?</p>
  
  <p>Thank you!</p>