<?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: URGENT: Weekly year on year % change in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Weekly-year-on-year-change/m-p/1379178#M25194</link>
    <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , In your date table you need to have columns like these. Important is Week Rank. That can be done on Year week in week table. But Date/Week should be separate table &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1&lt;BR /&gt;Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)&lt;BR /&gt;Week Number = WEEKNUM([Date],2)&lt;BR /&gt;Week = if('Date'[Week Number]&amp;lt;10,'Date'[Year]*10 &amp;amp; 'Date'[Week Number],'Date'[Year]&amp;amp;'Date'[Week Number])&lt;BR /&gt;&lt;STRONG&gt;Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)&lt;/STRONG&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can have measure like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&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;BR /&gt;Last year Week= CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=(max('Date'[Week Rank]) -52)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Refer these links&lt;/P&gt;
&lt;P&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;/P&gt;</description>
    <pubDate>Fri, 18 Sep 2020 05:00:49 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2020-09-18T05:00:49Z</dc:date>
    <item>
      <title>URGENT: Weekly year on year % change</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Weekly-year-on-year-change/m-p/1379172#M25193</link>
      <description>&lt;DIV&gt;&lt;DIV class=""&gt;&lt;DIV class="j83agx80 r8blr3vg"&gt;&lt;DIV class="h9e7qa53 l9j0dhe7 hpfvmrgz lzcic4wl"&gt;&lt;DIV class="ni8dbmo4 stjgntxs ii04i59q"&gt;&lt;DIV class="l60d2q6s d1544ag0 sj5x9vvc tw6a2znq l9j0dhe7 ni8dbmo4 stjgntxs kdgqqoy6 ihh4hy1g e72ty7fz qmr60zad jm1wdb64 qv66sw1b ljqsnud1 g6srhlxm"&gt;&lt;DIV class="ljqsnud1"&gt;&lt;DIV class="kvgmc6g5 cxmmr5t8 oygrvhab hcukyx3x c1et5uql"&gt;2 Tasks:&lt;DIV class="kvgmc6g5 cxmmr5t8 oygrvhab hcukyx3x c1et5uql"&gt;&amp;nbsp;&lt;DIV class="kvgmc6g5 cxmmr5t8 oygrvhab hcukyx3x c1et5uql"&gt;1) Need to calculate year on year change &lt;STRONG&gt;&lt;STRONG&gt;for every week on first table&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;DIV class="kvgmc6g5 cxmmr5t8 oygrvhab hcukyx3x c1et5uql"&gt;So for week 10 2019(%) should do = 7.25/6.37-1 similar for every week and every year&lt;DIV class="kvgmc6g5 cxmmr5t8 oygrvhab hcukyx3x c1et5uql"&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;DIV class="kvgmc6g5 cxmmr5t8 oygrvhab hcukyx3x c1et5uql"&gt;&lt;SPAN&gt;2)&lt;SPAN&gt;need to calculate week on we&lt;IMG border="0" alt="" /&gt;ek change on the second table&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 18 Sep 2020 04:54:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Weekly-year-on-year-change/m-p/1379172#M25193</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-09-18T04:54:10Z</dc:date>
    </item>
    <item>
      <title>Re: URGENT: Weekly year on year % change</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Weekly-year-on-year-change/m-p/1379178#M25194</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , In your date table you need to have columns like these. Important is Week Rank. That can be done on Year week in week table. But Date/Week should be separate table &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1&lt;BR /&gt;Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)&lt;BR /&gt;Week Number = WEEKNUM([Date],2)&lt;BR /&gt;Week = if('Date'[Week Number]&amp;lt;10,'Date'[Year]*10 &amp;amp; 'Date'[Week Number],'Date'[Year]&amp;amp;'Date'[Week Number])&lt;BR /&gt;&lt;STRONG&gt;Week Rank = RANKX(all('Date'),'Date'[Week Start date],,ASC,Dense)&lt;/STRONG&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Week Rank = RANKX(all('Date'),'Date'[Year Week],,ASC,Dense)&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can have measure like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&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;BR /&gt;Last year Week= CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=(max('Date'[Week Rank]) -52)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Refer these links&lt;/P&gt;
&lt;P&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;/P&gt;</description>
      <pubDate>Fri, 18 Sep 2020 05:00:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/URGENT-Weekly-year-on-year-change/m-p/1379178#M25194</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-09-18T05:00:49Z</dc:date>
    </item>
  </channel>
</rss>

