<?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 Calculate Week to Date and vs last week with Fri-Thu week in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Week-to-Date-and-vs-last-week-with-Fri-Thu-week/m-p/1948135#M42407</link>
    <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am in need of some help regarding calculating production and budget on a weekly basis. My client want a table where one row conists of a Week To Date number and the next colum to se how this results compares against last weeks results.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My client uses a Friday to Thursday week, so i need to calculate the results based on this kind of week.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a new column i the date table for the new week numbers:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;New Week Nr = WEEKNUM(Dates[Date]+2).&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am not sure how to do this kind of calculations, espesically with this kind of week. I tried with this for the Week to date calculation, but the reults turned BLANK:&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;WTD Budget =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE([Total Budget], FILTER(Dates,Dates[New Week Nr] = MAX(Dates[New Week Nr])), FILTER(Dates, Dates[Date] &amp;lt;= TODAY()))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Maybe i am way off, but i really need som tips for this kind of issue. Does anyone have experince with this?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you in advance!&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 09 Jul 2021 12:08:11 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-07-09T12:08:11Z</dc:date>
    <item>
      <title>Calculate Week to Date and vs last week with Fri-Thu week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Week-to-Date-and-vs-last-week-with-Fri-Thu-week/m-p/1948135#M42407</link>
      <description>&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am in need of some help regarding calculating production and budget on a weekly basis. My client want a table where one row conists of a Week To Date number and the next colum to se how this results compares against last weeks results.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My client uses a Friday to Thursday week, so i need to calculate the results based on this kind of week.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have created a new column i the date table for the new week numbers:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;New Week Nr = WEEKNUM(Dates[Date]+2).&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am not sure how to do this kind of calculations, espesically with this kind of week. I tried with this for the Week to date calculation, but the reults turned BLANK:&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;WTD Budget =&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE([Total Budget], FILTER(Dates,Dates[New Week Nr] = MAX(Dates[New Week Nr])), FILTER(Dates, Dates[Date] &amp;lt;= TODAY()))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Maybe i am way off, but i really need som tips for this kind of issue. Does anyone have experince with this?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thank you in advance!&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 09 Jul 2021 12:08:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Week-to-Date-and-vs-last-week-with-Fri-Thu-week/m-p/1948135#M42407</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-09T12:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Week to Date and vs last week with Fri-Thu week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Week-to-Date-and-vs-last-week-with-Fri-Thu-week/m-p/1948786#M42442</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , get Friday to&amp;nbsp; Thursday week from here&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any Weekday Week - Start From Any day of Week &lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Power-BI-Turning/ba-p/1187482" target="_blank"&gt;https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Power-BI-Turning/ba-p/1187482&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create week Rank on week start date - set to Friday in this case&lt;/P&gt;
&lt;P&gt;New columns in date table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense) &lt;BR /&gt;OR&lt;BR /&gt;Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense) //YYYYWW format&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;measures examples &lt;BR /&gt;This Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])))&lt;BR /&gt;Last Week = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=max('Date'[Week Rank])-1))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI — Week on Week and WTD &lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3" target="_blank"&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"&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;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=pnAesWxYgJ8" target="_blank"&gt;https://www.youtube.com/watch?v=pnAesWxYgJ8&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 17:31:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Week-to-Date-and-vs-last-week-with-Fri-Thu-week/m-p/1948786#M42442</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-07-09T17:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Week to Date and vs last week with Fri-Thu week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Week-to-Date-and-vs-last-week-with-Fri-Thu-week/m-p/1952767#M42602</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi&amp;nbsp;&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;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get a result from this kind of procedure, but it seems like the result from mye production dosent add up. For friday, saturday and sunday the results have been around 220-230 and the week to date shows around 750. I will check the numbers closer tomorrow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But i have have antoher question regarding Week to Date. The client would like to have a daily average. Is it possible to use some of the same logic to make a "days in week"-measure to divide the week to date production by?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I can also mention that i work with data up to yesterday, so i will never have the current date's data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Again, thank you for your help&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 17:01:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Week-to-Date-and-vs-last-week-with-Fri-Thu-week/m-p/1952767#M42602</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-12T17:01:58Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Week to Date and vs last week with Fri-Thu week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Week-to-Date-and-vs-last-week-with-Fri-Thu-week/m-p/1952852#M42606</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;, make sure you have a separate week/date table. Other wise all at table level means you need to handle too many other things&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You have week start date from my blog&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;week day = datediff([Week start date],[Date], Day)+1&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;WTD= CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[week Rank]=max('Date'[week Rank]) &amp;amp;&amp;amp; 'Date'[week day ] &amp;lt;= Max('Date'[week day ]) ))&lt;BR /&gt;LWTD = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[week Rank]=max('Date'[week Rank])-1 &amp;amp;&amp;amp; 'Date'[week day ] &amp;lt;= Max('Date'[week day ])))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Jul 2021 17:49:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Week-to-Date-and-vs-last-week-with-Fri-Thu-week/m-p/1952852#M42606</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-07-12T17:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate Week to Date and vs last week with Fri-Thu week</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Week-to-Date-and-vs-last-week-with-Fri-Thu-week/m-p/1953969#M42627</link>
      <description>&lt;P&gt;Hi Again&amp;nbsp;&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;and thank you for your answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Yes i have a separate date table. Only difference is that mye table uses the CALENDERAUTO function.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I now used the new calulation with the week day column, but i still get the same results as the previous measure. This result havent changed even though this week now have one more day of data. So something in my measures dosent add up&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Jul 2021 07:52:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-Week-to-Date-and-vs-last-week-with-Fri-Thu-week/m-p/1953969#M42627</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-07-13T07:52:01Z</dc:date>
    </item>
  </channel>
</rss>

