<?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: WTD for current Week in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1275410#M21586</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;Thanks, but please read my post carefully.&lt;/P&gt;&lt;P&gt;I don't want to filter for the week. With your providied WTD measure I still have to filter for the week.&lt;/P&gt;&lt;P&gt;I want to get WTD for the &lt;U&gt;current week without filtering anything&lt;/U&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 05 Aug 2020 17:42:09 GMT</pubDate>
    <dc:creator>joshua1990</dc:creator>
    <dc:date>2020-08-05T17:42:09Z</dc:date>
    <item>
      <title>WTD for current Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1272151#M21454</link>
      <description>&lt;P&gt;Hello everyone!&lt;/P&gt;&lt;P&gt;This measure sums upp all sales for the last/ max week of selected month:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sales WTD = 
CALCULATE (
    [Sales],
    FILTER (
        ALL ( 'Calendar' ),
        'Calendar'[Fiscal Year]
            = MAX ( 'Calendar'[Year] )
            &amp;amp;&amp;amp; 'Calendar'[Date]
                &amp;lt;= MAX ( 'Calendar'[Date] )
            &amp;amp;&amp;amp; 'Calendar'[Fiscal Month Number]
                = MAX ( 'Calendar'[Fiscal Month Number] )
            &amp;amp;&amp;amp; 'Calendar'[Fis Week]
                = MAX ( 'Calendar'[Fiscal Week] )
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to get the sales WTD for the current week. How is that possible?&lt;/P&gt;&lt;P&gt;I have a page filter for the current Fiscal Month Number.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Joshua&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 19:35:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1272151#M21454</guid>
      <dc:creator>joshua1990</dc:creator>
      <dc:date>2020-08-04T19:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: WTD for current Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1272155#M21455</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92006" data-lia-user-login="joshua1990" class="lia-mention lia-mention-user"&gt;joshua1990&lt;/a&gt; , refer if these can help&lt;/P&gt;
&lt;P&gt;Power BI — WTD Questions— Time Intelligence 4–5&lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3" target="_blank" rel="noopener"&gt;https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123" target="_blank" rel="noopener"&gt;https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-Last-Week/ba-p/1051123&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;WTD = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank]) &amp;amp;&amp;amp; 'Date'[Weekday] &amp;lt;=max('Date'[Weekday])))
LWTD = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=(max('Date'[Week Rank]) -1) &amp;amp;&amp;amp; 'Date'[Weekday] &amp;lt;=max('Date'[Weekday])))&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 05 Aug 2020 03:28:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1272155#M21455</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-08-05T03:28:15Z</dc:date>
    </item>
    <item>
      <title>Re: WTD for current Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1272357#M21465</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92006" data-lia-user-login="joshua1990" class="lia-mention lia-mention-user"&gt;joshua1990&lt;/a&gt;&amp;nbsp;- Just use WEEKNUM and get everything that has the same WEEKNUM and YEAR.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 17:59:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1272357#M21465</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-08-04T17:59:12Z</dc:date>
    </item>
    <item>
      <title>Re: WTD for current Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1272532#M21472</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;@Thanks Greg! But how?&amp;nbsp;&lt;BR /&gt;how would you modify the measure above to get WTD for current week?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 19:37:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1272532#M21472</guid>
      <dc:creator>joshua1990</dc:creator>
      <dc:date>2020-08-04T19:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: WTD for current Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1272609#M21473</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92006" data-lia-user-login="joshua1990" class="lia-mention lia-mention-user"&gt;joshua1990&lt;/a&gt;&amp;nbsp;- Well, first, I would create a "Week" column in my Calendar table. Week = WEEKNUM([Date]). Then, assuming that I have Date from Calendar in my visual I would do something like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;WTD = 
  VAR __Year = YEAR(MAX('Calendar'[Date])
  VAR __Week = MAX('Calendar'[Week])
  VAR __Weekday = WEEKDAY(MAX('Calendar'[Date]))
RETURN
  SUMX(FILTER(ALL('Sales'),YEAR('Sales'[Date])=__Year &amp;amp;&amp;amp; WEEKNUM('Sales'[Date])=__Week &amp;amp;&amp;amp; WEEKDAY('Sales'[Date]) &amp;lt;= __Weekday),[Sales])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Something along those lines, there's a bunch of different variations on that theme. I can think of variations using ALLEXCEPT, etc.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Aug 2020 20:34:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1272609#M21473</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-08-04T20:34:15Z</dc:date>
    </item>
    <item>
      <title>Re: WTD for current Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1273164#M21490</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92006" data-lia-user-login="joshua1990" class="lia-mention lia-mention-user"&gt;joshua1990&lt;/a&gt; , I suggest week rank solution as work across week solution, across the year. Also, week num can be used for WTD. Please refer to my blogs, given in my last post.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 03:41:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1273164#M21490</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-08-05T03:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: WTD for current Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1275381#M21583</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="313" data-lia-user-login="Greg_Deckler" class="lia-mention lia-mention-user"&gt;Greg_Deckler&lt;/a&gt;&amp;nbsp;: Guys, thank you so much!&lt;/P&gt;&lt;P&gt;But I am asking myself why is my approach not working?&lt;/P&gt;&lt;P&gt;Is there any chance to modify my approach?&lt;/P&gt;&lt;P&gt;I guess I need somehow to get the current week number or year-week number as a filter, right?&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 17:26:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1275381#M21583</guid>
      <dc:creator>joshua1990</dc:creator>
      <dc:date>2020-08-05T17:26:17Z</dc:date>
    </item>
    <item>
      <title>Re: WTD for current Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1275410#M21586</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;Thanks, but please read my post carefully.&lt;/P&gt;&lt;P&gt;I don't want to filter for the week. With your providied WTD measure I still have to filter for the week.&lt;/P&gt;&lt;P&gt;I want to get WTD for the &lt;U&gt;current week without filtering anything&lt;/U&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 17:42:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1275410#M21586</guid>
      <dc:creator>joshua1990</dc:creator>
      <dc:date>2020-08-05T17:42:09Z</dc:date>
    </item>
    <item>
      <title>Re: WTD for current Week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1275617#M21595</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="92006" data-lia-user-login="joshua1990" class="lia-mention lia-mention-user"&gt;joshua1990&lt;/a&gt;&amp;nbsp;- It might be but this is part of the reason I don't tend to use CALCULATE because it runs into difficulties once variables and stuff get involved or you start to do anything even remotely complex. Seems like maybe you could add a filter statement for that CALCULATE that did some magic I suppose using TODAY function (if that is how you define "current") so like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;'Calendar'[Fiscal Year] = YEAR(TODAY()) for example.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can use WEEKNUM to get week number and you would also need to use WEEKDAY to get days in the week prior to the current day of the week (in order to get WTD). I've solved this whole thing a number of times in various posts but I don't do it with CALCULATE. Not saying it is impossible but I don't do things that way unless I am forced to because it is fraught with complexities.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, I &lt;A href="https://community.powerbi.com/t5/Community-Blog/CALCUHATE-Why-I-Don-t-Use-DAX-s-CALCULATE-Function/ba-p/1248635" target="_self"&gt;wrote an entire blog article about why dealing with CALCULATE is a big PITA&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Wed, 05 Aug 2020 19:51:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/WTD-for-current-Week/m-p/1275617#M21595</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-08-05T19:51:01Z</dc:date>
    </item>
  </channel>
</rss>

