<?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 Re: Show quantity of last calendar week based on todays date always in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-quantity-of-last-calendar-week-based-on-todays-date-always/m-p/1145389#M17269</link>
    <description>&lt;P&gt;Thanks so much, I think i have it, it seems to not respond to my date slicers which is good, until there is no data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance, If I change the date slicers to full year 2020, or first 6 months it works, but if I change it to July for instance, the measure goes blank, any idea why? Is it because I'm filtering out the data for it to calculate?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Quantity Last Week = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Var thisweek = WEEKNUM(today())&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Var amount = calculate(Transactions[Quantity Total],vw_DateDim[WeekOfYear]=thisweek-1)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Return amount&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any way to ignore the date slicers?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 06 Jun 2020 12:38:14 GMT</pubDate>
    <dc:creator>magnifybi</dc:creator>
    <dc:date>2020-06-06T12:38:14Z</dc:date>
    <item>
      <title>Show quantity of last calendar week based on todays date always</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-quantity-of-last-calendar-week-based-on-todays-date-always/m-p/1145368#M17264</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been trying to get this to work for ages but can't seem to incorporate today's date in my week calculation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Essentially I want it to look at todays date dynamically, check what week number this day is in and bring me back the quantity for the week before that.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what I have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Quantity Last Week = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE([Quantity Total],&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER(ALL('vw_DateDim'),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;vw_DateDim[WeekOfYear]=(vw_DateDim[WeekOfYear])-1))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks for the help guys,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Jon&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 06 Jun 2020 11:59:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-quantity-of-last-calendar-week-based-on-todays-date-always/m-p/1145368#M17264</guid>
      <dc:creator>magnifybi</dc:creator>
      <dc:date>2020-06-06T11:59:01Z</dc:date>
    </item>
    <item>
      <title>Re: Show quantity of last calendar week based on todays date always</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-quantity-of-last-calendar-week-based-on-todays-date-always/m-p/1145375#M17265</link>
      <description>&lt;P&gt;What should happen when today's date is Jan 1st?&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2020 12:06:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-quantity-of-last-calendar-week-based-on-todays-date-always/m-p/1145375#M17265</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-06-06T12:06:18Z</dc:date>
    </item>
    <item>
      <title>Re: Show quantity of last calendar week based on todays date always</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-quantity-of-last-calendar-week-based-on-todays-date-always/m-p/1145376#M17266</link>
      <description>&lt;P&gt;Didn't even think of that, but would love it to brink back the last week of the previous year!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2020 12:08:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-quantity-of-last-calendar-week-based-on-todays-date-always/m-p/1145376#M17266</guid>
      <dc:creator>magnifybi</dc:creator>
      <dc:date>2020-06-06T12:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Show quantity of last calendar week based on todays date always</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-quantity-of-last-calendar-week-based-on-todays-date-always/m-p/1145378#M17268</link>
      <description>&lt;P&gt;Basically you should use variables.&amp;nbsp; Meta code here:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Var thisweek = weeknumber(today())&lt;/P&gt;&lt;P&gt;Var amount = calculate(xxx,weeknumber[date]=thisweek-1)&lt;/P&gt;&lt;P&gt;Return amount&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will only work for week 2 and up in a year.&amp;nbsp; If you want a better solution covering multiple years you need to introduce a YearWeek column in your dates table.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Final Caveat: TODAY() uses UTC in the service - this can lead to unexpected results depending where you live.&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2020 12:13:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-quantity-of-last-calendar-week-based-on-todays-date-always/m-p/1145378#M17268</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2020-06-06T12:13:55Z</dc:date>
    </item>
    <item>
      <title>Re: Show quantity of last calendar week based on todays date always</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-quantity-of-last-calendar-week-based-on-todays-date-always/m-p/1145389#M17269</link>
      <description>&lt;P&gt;Thanks so much, I think i have it, it seems to not respond to my date slicers which is good, until there is no data.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance, If I change the date slicers to full year 2020, or first 6 months it works, but if I change it to July for instance, the measure goes blank, any idea why? Is it because I'm filtering out the data for it to calculate?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Quantity Last Week = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Var thisweek = WEEKNUM(today())&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Var amount = calculate(Transactions[Quantity Total],vw_DateDim[WeekOfYear]=thisweek-1)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Return amount&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Any way to ignore the date slicers?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 06 Jun 2020 12:38:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Show-quantity-of-last-calendar-week-based-on-todays-date-always/m-p/1145389#M17269</guid>
      <dc:creator>magnifybi</dc:creator>
      <dc:date>2020-06-06T12:38:14Z</dc:date>
    </item>
  </channel>
</rss>

