<?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 value for previous week of the month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-value-for-previous-week-of-the-month/m-p/2364666#M60511</link>
    <description>&lt;P&gt;hi everyone&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;im trying to find week over week change for weeks of the month&amp;nbsp;&lt;/P&gt;&lt;P&gt;ex. if we are now in the month of FEB2022, weeks would be:&lt;/P&gt;&lt;P&gt;W1: 1-2 till 5-2&lt;/P&gt;&lt;P&gt;W2: 6-2 till 12-2&lt;/P&gt;&lt;P&gt;W3:13-2 till 19-2&lt;/P&gt;&lt;P&gt;W4: 20-2 till 26-2&lt;/P&gt;&lt;P&gt;W5: 27-2 till 28-2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want to calculate the week over week change and for that i need to find the value for previous week&lt;/P&gt;&lt;P&gt;example with data:&lt;/P&gt;&lt;P&gt;W1: 2478&lt;/P&gt;&lt;P&gt;W2: 3457&lt;/P&gt;&lt;P&gt;W3:3359&lt;/P&gt;&lt;P&gt;W4:3456&lt;/P&gt;&lt;P&gt;W5:574&amp;nbsp;&lt;/P&gt;&lt;P&gt;week over week change for W2 would be (3457-2478)/2478=39.5&lt;/P&gt;</description>
    <pubDate>Mon, 28 Feb 2022 12:52:28 GMT</pubDate>
    <dc:creator>lawada</dc:creator>
    <dc:date>2022-02-28T12:52:28Z</dc:date>
    <item>
      <title>calculate value for previous week of the month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-value-for-previous-week-of-the-month/m-p/2364666#M60511</link>
      <description>&lt;P&gt;hi everyone&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;im trying to find week over week change for weeks of the month&amp;nbsp;&lt;/P&gt;&lt;P&gt;ex. if we are now in the month of FEB2022, weeks would be:&lt;/P&gt;&lt;P&gt;W1: 1-2 till 5-2&lt;/P&gt;&lt;P&gt;W2: 6-2 till 12-2&lt;/P&gt;&lt;P&gt;W3:13-2 till 19-2&lt;/P&gt;&lt;P&gt;W4: 20-2 till 26-2&lt;/P&gt;&lt;P&gt;W5: 27-2 till 28-2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want to calculate the week over week change and for that i need to find the value for previous week&lt;/P&gt;&lt;P&gt;example with data:&lt;/P&gt;&lt;P&gt;W1: 2478&lt;/P&gt;&lt;P&gt;W2: 3457&lt;/P&gt;&lt;P&gt;W3:3359&lt;/P&gt;&lt;P&gt;W4:3456&lt;/P&gt;&lt;P&gt;W5:574&amp;nbsp;&lt;/P&gt;&lt;P&gt;week over week change for W2 would be (3457-2478)/2478=39.5&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 12:52:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-value-for-previous-week-of-the-month/m-p/2364666#M60511</guid>
      <dc:creator>lawada</dc:creator>
      <dc:date>2022-02-28T12:52:28Z</dc:date>
    </item>
    <item>
      <title>Re: calculate value for previous week of the month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-value-for-previous-week-of-the-month/m-p/2364822#M60515</link>
      <description>&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;Having a date table with week no will help. Please see attached file with answer. As you get into future years a minor tweak to the measure will take that into account. Hope this helps. Please see link below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://drive.google.com/file/d/1IWRpNWJdj-DM22-91V068oSkQt8PQK5-/view?usp=sharing" target="_blank"&gt;https://drive.google.com/file/d/1IWRpNWJdj-DM22-91V068oSkQt8PQK5-/view?usp=sharing&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 13:59:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-value-for-previous-week-of-the-month/m-p/2364822#M60515</guid>
      <dc:creator>Whitewater100</dc:creator>
      <dc:date>2022-02-28T13:59:28Z</dc:date>
    </item>
    <item>
      <title>Re: calculate value for previous week of the month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-value-for-previous-week-of-the-month/m-p/2365646#M60550</link>
      <description>&lt;P&gt;A week column in the date table can help as long as it matches what&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="222024" data-lia-user-login="lawada" class="lia-mention lia-mention-user"&gt;lawada&lt;/a&gt;&amp;nbsp;is trying to do.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Rather than WEEKNUM ( Dates[Date] ), something more like ROUNDUP ( DAY ( Dates[Date] ) / 7, 0 ) might do the trick.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Feb 2022 21:42:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-value-for-previous-week-of-the-month/m-p/2365646#M60550</guid>
      <dc:creator>AlexisOlson</dc:creator>
      <dc:date>2022-02-28T21:42:28Z</dc:date>
    </item>
    <item>
      <title>Re: calculate value for previous week of the month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-value-for-previous-week-of-the-month/m-p/2371847#M60887</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="222024" data-lia-user-login="lawada" class="lia-mention lia-mention-user"&gt;lawada&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can try the following methods.&lt;/P&gt;
&lt;P&gt;Table:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DATE = CALENDAR(DATE(2022,2,1),TODAY())&lt;/LI-CODE&gt;
&lt;P&gt;Column:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Weekday = WEEKDAY([Date],1)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Week No = 
Var minweekday=CALCULATE(MIN('DATE'[Weekday]),FILTER('DATE',[Date]=MIN('DATE'[Date])))
Var week=CALCULATE(COUNT('DATE'[Weekday]),FILTER('DATE',[Date]&amp;lt;=EARLIER('DATE'[Date])&amp;amp;&amp;amp;[Weekday]=1))
Return
IF(minweekday&amp;lt;&amp;gt;1,week+1,week)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Week = "W"&amp;amp;[Week No]&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Current week value = SUM('Table'[Value])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Previous week value = 
CALCULATE(SUM('Table'[Value]),FILTER(ALL('DATE'),[Week No]=SELECTEDVALUE('DATE'[Week No])-1))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Change = DIVIDE([Current week value]-[Previous week value],[Previous week value])&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Is this the output you expect?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Community Support Team _Charlotte&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt; to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 06:29:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/calculate-value-for-previous-week-of-the-month/m-p/2371847#M60887</guid>
      <dc:creator>v-zhangti</dc:creator>
      <dc:date>2022-03-03T06:29:13Z</dc:date>
    </item>
  </channel>
</rss>

