<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Prev Day and WTD with year slicer in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Prev-Day-and-WTD-with-year-slicer/m-p/3240566#M119215</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table visual where the columns are customer counts for the Previous Day, WTD, MTD, QTD and YTD.&lt;/P&gt;&lt;P&gt;I'd like to add a year slicer on the page to look back over the last couple of years. MTD, QTD and YTD all work fine with the slicer as they're the built in to date functions, but I'm having trouble getting the first two to work. I could use DATEADD or similar to get it in a separate measure but I'd like to just use the one measure and have the table update dynamically with the slicer if possible.&lt;BR /&gt;&lt;BR /&gt;These are my existing measures for the current year, I might be on the wrong track entirely with both of these&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;New Members Previous Day = 

CALCULATE([New Members], 'Member_Events'[Date] = TODAY()-1)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;New Members WTD = 

var CurrentDate = LASTDATE('Date'[Date])
var DayNumberOfWeek = WEEKDAY(LASTDATE('Date'[Date]),2)

return
CALCULATE([New Members], DATESBETWEEN('Date'[Date], DATEADD(CurrentDate,-1*DayNumberOfWeek,DAY),CurrentDate))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;New Members is just a count of customer numbers with a few filters applied, coming from the Member_Events table. TIA&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2023 15:18:02 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-05-17T15:18:02Z</dc:date>
    <item>
      <title>Prev Day and WTD with year slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Prev-Day-and-WTD-with-year-slicer/m-p/3240566#M119215</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table visual where the columns are customer counts for the Previous Day, WTD, MTD, QTD and YTD.&lt;/P&gt;&lt;P&gt;I'd like to add a year slicer on the page to look back over the last couple of years. MTD, QTD and YTD all work fine with the slicer as they're the built in to date functions, but I'm having trouble getting the first two to work. I could use DATEADD or similar to get it in a separate measure but I'd like to just use the one measure and have the table update dynamically with the slicer if possible.&lt;BR /&gt;&lt;BR /&gt;These are my existing measures for the current year, I might be on the wrong track entirely with both of these&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;New Members Previous Day = 

CALCULATE([New Members], 'Member_Events'[Date] = TODAY()-1)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;New Members WTD = 

var CurrentDate = LASTDATE('Date'[Date])
var DayNumberOfWeek = WEEKDAY(LASTDATE('Date'[Date]),2)

return
CALCULATE([New Members], DATESBETWEEN('Date'[Date], DATEADD(CurrentDate,-1*DayNumberOfWeek,DAY),CurrentDate))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;New Members is just a count of customer numbers with a few filters applied, coming from the Member_Events table. TIA&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 15:18:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Prev-Day-and-WTD-with-year-slicer/m-p/3240566#M119215</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-05-17T15:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: Prev Day and WTD with year slicer</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Prev-Day-and-WTD-with-year-slicer/m-p/3240608#M119223</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please provide some dummy data alongwith desired output. Thanks!!&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 15:35:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Prev-Day-and-WTD-with-year-slicer/m-p/3240608#M119223</guid>
      <dc:creator>Ajendra</dc:creator>
      <dc:date>2023-05-17T15:35:47Z</dc:date>
    </item>
  </channel>
</rss>

