<?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: Seeking Week calculation with 2 conditions in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Seeking-Week-calculation-with-2-conditions/m-p/3268139#M121034</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="555045" data-lia-user-login="some_bih" class="lia-mention lia-mention-user"&gt;some_bih&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for this link, it seems cover what I need.&lt;/P&gt;&lt;P&gt;Appreciate the help !&lt;/P&gt;</description>
    <pubDate>Mon, 05 Jun 2023 09:17:40 GMT</pubDate>
    <dc:creator>tkwh1</dc:creator>
    <dc:date>2023-06-05T09:17:40Z</dc:date>
    <item>
      <title>Seeking Week calculation with 2 conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Seeking-Week-calculation-with-2-conditions/m-p/3250975#M119957</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;First time posting here as I did not see the solution to my problem..&lt;/P&gt;&lt;P&gt;What I need is the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GOAL : &amp;nbsp;‘Week over week%’ calculation under 2 conditions:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(1)&amp;nbsp;&lt;/STRONG&gt; Picks the most recent week of data available (avoid blank) under the selected filters (‘Year’ &amp;amp; ‘Month’ from the Date table)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(2)&amp;nbsp;&lt;/STRONG&gt;&amp;nbsp;Week over week calculation takes into account the days from both current vs previous week&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;*I want to display the most recent Week-to-date-data on a Card automatically when choosing Year &amp;amp; Month on a slicer. Please see detail below:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Current environment:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Week starts on Sunday to Saturday&lt;/LI&gt;&lt;LI&gt;Current date : May 24, 2023&lt;/LI&gt;&lt;LI&gt;Dashboard is set up so that users will mainly choose only ‘Year’ and ‘Month’.&lt;/LI&gt;&lt;LI&gt;Created a date table (dimDate) , where one of the columns I use mainly for this calculation where current week is ‘0’ &amp;nbsp;: &amp;nbsp;&amp;nbsp;[Week Relative Offset] = DATEDIFF( TODAY(), dimDate[Date], week)&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Requirement (1)&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The problem I am having is that when I select the current month (May), it returns a Blank, I am assuming because it is pointed to the last week in the current month (May 28th) where there is no data for.&lt;/LI&gt;&lt;LI&gt;I have tried creating a measure ([Week Calc]) giving me the most recent week for 'Total QTY'.&amp;nbsp; When I select 'May' on the date slicer, I need it to avoid all blank weeks and pick up on the latest week which actually contains data.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;****&lt;/P&gt;&lt;P&gt;Week Calc &amp;nbsp;=&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;VAR CountWeeks = &amp;nbsp;MAX ( dimDate [Week Relative Offset] )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;RETURN&lt;/P&gt;&lt;P&gt;&amp;nbsp;CALCULATE(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Total QTY],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; dimDate [Week Relative Offset] &amp;nbsp;= &amp;nbsp;CountWeeks&lt;/P&gt;&lt;P&gt;&amp;nbsp;)&lt;BR /&gt;****&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;Requirement 2&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Combining with the above Req. 1,&amp;nbsp; when calculating Week over Week%,&amp;nbsp; I would also like to incorporate days of that week (current vs previous). &amp;nbsp;&lt;/LI&gt;&lt;LI&gt;In this example, for the current week&amp;nbsp; (May 21st total = 1,566) with (Sun = 847) and (Mon=719) data, I want to compare it to the same days from the previous week of May 14 where (Sun = 793) and (Mon = 782).&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;So my goal is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="lia-indent-padding-left-60px"&gt;WOW% for the current week to date &amp;nbsp;=&amp;nbsp; (&amp;nbsp; (847+719) &amp;nbsp;– &amp;nbsp;(793+782) )&amp;nbsp; &amp;nbsp; / &amp;nbsp;&amp;nbsp;(793+782)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much in advance!!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2023 12:01:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Seeking-Week-calculation-with-2-conditions/m-p/3250975#M119957</guid>
      <dc:creator>tkwh1</dc:creator>
      <dc:date>2023-05-24T12:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Seeking Week calculation with 2 conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Seeking-Week-calculation-with-2-conditions/m-p/3259841#M120503</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="564485" data-lia-user-login="tkwh1" class="lia-mention lia-mention-user"&gt;tkwh1&lt;/a&gt;&amp;nbsp;see part "Week-to-date over the full previous week" and other related week calculation&lt;/P&gt;&lt;P&gt;from link&amp;nbsp;&lt;A href="https://www.daxpatterns.com/week-related-calculations/" target="_self"&gt;https://www.daxpatterns.com/week-related-calculations/&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I hope this help&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 14:25:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Seeking-Week-calculation-with-2-conditions/m-p/3259841#M120503</guid>
      <dc:creator>some_bih</dc:creator>
      <dc:date>2023-05-30T14:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Seeking Week calculation with 2 conditions</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Seeking-Week-calculation-with-2-conditions/m-p/3268139#M121034</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="555045" data-lia-user-login="some_bih" class="lia-mention lia-mention-user"&gt;some_bih&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for this link, it seems cover what I need.&lt;/P&gt;&lt;P&gt;Appreciate the help !&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2023 09:17:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Seeking-Week-calculation-with-2-conditions/m-p/3268139#M121034</guid>
      <dc:creator>tkwh1</dc:creator>
      <dc:date>2023-06-05T09:17:40Z</dc:date>
    </item>
  </channel>
</rss>

