<?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: Trended Weeks over Prior Period Help in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trended-Weeks-over-Prior-Period-Help/m-p/2607281#M75514</link>
    <description>&lt;P&gt;This is fantastic! I think I can figure out the rest from here, thank you so much for breaking this down.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 28 Jun 2022 14:49:20 GMT</pubDate>
    <dc:creator>AndrewUrban</dc:creator>
    <dc:date>2022-06-28T14:49:20Z</dc:date>
    <item>
      <title>Trended Weeks over Prior Period Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trended-Weeks-over-Prior-Period-Help/m-p/2601765#M75215</link>
      <description>&lt;P&gt;Hello!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm hoping someone can help me write a DAX statement for a prior period (latest 12, 26, 52 weeks) which I'd like to then turn into a % chg. I have weekly data now which i've created trended times for, but I don't know how to get the prior periods trended time.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is one of my current formula's for latest 24wks periods:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Latest 24 Wks = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;Kroger[Units]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;SPAN&gt;'Date'[Week Rank]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;gt;=&lt;/SPAN&gt;&lt;SPAN&gt;max&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'[Week Rank]&lt;/SPAN&gt;&lt;SPAN&gt;)-&lt;/SPAN&gt;&lt;SPAN&gt;23&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp;&amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;'Date'[Week Rank]&lt;/SPAN&gt;&lt;SPAN&gt;&amp;lt;=&lt;/SPAN&gt;&lt;SPAN&gt;max&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Date'[Week Rank]&lt;/SPAN&gt;&lt;SPAN&gt;)))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Thanks for your help!!&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Sat, 25 Jun 2022 14:05:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trended-Weeks-over-Prior-Period-Help/m-p/2601765#M75215</guid>
      <dc:creator>AndrewUrban</dc:creator>
      <dc:date>2022-06-25T14:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: Trended Weeks over Prior Period Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trended-Weeks-over-Prior-Period-Help/m-p/2601851#M75221</link>
      <description>&lt;P&gt;Hi AndrewUrban,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Coud you show the tables in your data model?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;</description>
      <pubDate>Sat, 25 Jun 2022 21:18:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trended-Weeks-over-Prior-Period-Help/m-p/2601851#M75221</guid>
      <dc:creator>ManguilibeKAO</dc:creator>
      <dc:date>2022-06-25T21:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Trended Weeks over Prior Period Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trended-Weeks-over-Prior-Period-Help/m-p/2604228#M75362</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the reply, see below for my "Date" table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jun 2022 13:25:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trended-Weeks-over-Prior-Period-Help/m-p/2604228#M75362</guid>
      <dc:creator>AndrewUrban</dc:creator>
      <dc:date>2022-06-27T13:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: Trended Weeks over Prior Period Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trended-Weeks-over-Prior-Period-Help/m-p/2605772#M75446</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="405571" data-lia-user-login="AndrewUrban" class="lia-mention lia-mention-user"&gt;AndrewUrban&lt;/a&gt;&amp;nbsp;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please follow these steps:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. Create a new table with all the options you need in the slicer.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. Turn the single select of the slicer on&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. Then create a measure that calculate a prior period.&lt;/SPAN&gt;&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;Measure =

SWITCH( MAX('for sliceer'[Value]),

"Last 12 Weeks",

CALCULATE(SUM(Kroger[Units]),FILTER(ALL('Date'),'Date'[Week Rank] &amp;gt;= MAX('Date'[Week Rank])-11 &amp;amp;&amp;amp; 'Date'[Week Rank] &amp;lt;= MAX('Date'[Week Rank]))),

"Last 26 Weeks",

CALCULATE(SUM(Kroger[Units]),FILTER(ALL('Date'),'Date'[Week Rank] &amp;gt;= MAX('Date'[Week Rank])-25 &amp;amp;&amp;amp; 'Date'[Week Rank] &amp;lt;= MAX('Date'[Week Rank]))),

CALCULATE(SUM(Kroger[Units]),FILTER(ALL('Date'),'Date'[Week Rank] &amp;gt;= MAX('Date'[Week Rank])-51 &amp;amp;&amp;amp; 'Date'[Week Rank] &amp;lt;= MAX('Date'[Week Rank])))

)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;4.&amp;nbsp;&lt;SPAN&gt;Final output&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In addition, what's the logic of "&lt;/SPAN&gt;&lt;SPAN&gt;a % chg", please&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;provide more details to help us clarify your scenario.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Jianbo Li&lt;/P&gt;&lt;P&gt;If this post &lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&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>Tue, 28 Jun 2022 06:37:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trended-Weeks-over-Prior-Period-Help/m-p/2605772#M75446</guid>
      <dc:creator>v-jianboli-msft</dc:creator>
      <dc:date>2022-06-28T06:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: Trended Weeks over Prior Period Help</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trended-Weeks-over-Prior-Period-Help/m-p/2607281#M75514</link>
      <description>&lt;P&gt;This is fantastic! I think I can figure out the rest from here, thank you so much for breaking this down.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jun 2022 14:49:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Trended-Weeks-over-Prior-Period-Help/m-p/2607281#M75514</guid>
      <dc:creator>AndrewUrban</dc:creator>
      <dc:date>2022-06-28T14:49:20Z</dc:date>
    </item>
  </channel>
</rss>

