<?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: Refresh every Monday - report needs to show last 4 weeks starting that past Friday. How? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Refresh-every-Monday-report-needs-to-show-last-4-weeks-starting/m-p/2829888#M90114</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I tried to create a sample pbix file like below.&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file whether it suits your requirement.&lt;/P&gt;
&lt;P&gt;I hope the below can provide some ideas on how to create a solution for your datamodel.&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;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Recent 4 weeks qty: =
VAR _today =
    TODAY ()
VAR _newtable =
    FILTER ( ALL ( 'Calendar'[End of Week] ), 'Calendar'[End of Week] &amp;lt; _today )
VAR _top4table =
    TOPN ( 4, _newtable, 'Calendar'[End of Week], DESC )
RETURN
    CALCULATE ( [QTY total:], KEEPFILTERS ( _top4table ) )
&lt;/LI-CODE&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, 10 Oct 2022 04:48:17 GMT</pubDate>
    <dc:creator>Jihwan_Kim</dc:creator>
    <dc:date>2022-10-10T04:48:17Z</dc:date>
    <item>
      <title>Refresh every Monday - report needs to show last 4 weeks starting that past Friday. How?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Refresh-every-Monday-report-needs-to-show-last-4-weeks-starting/m-p/2829875#M90112</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Title sounds a bit odd, but here's what I'm trying to do.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Our reporting 'work week' start on Saturday and end on a Friday. In my date table, I created a column that groups by Fridays which counts as a Week 'end' date. I refresh the report on Monday but have to modify what dates are shown.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Today's date is Sunday, October 9th. Tomorrow, on Monday, when I refresh my report, I want my pivot table to show 10/7/22, 9/30/22, 9/23/22, and 9/16/22. To clarify, for 10/7/22 (for example), the data would capture whatever happened 10/1-10/7. For 9/30, it'd be 9/24-9/30.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now I have already created a column that groups it correctly like that. I just need to add some sort of time-intelligence function to understand that we only want 4 full weeks showing starting from the last Friday that we just passed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would be so much easier if all we had to do was show the last x amount of days/weeks/months from time of refresh, but that's not the case here. I'm thinking maybe we'd have to rank the week column i made? and leverage that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm so stumped. Any help would be appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2022 04:32:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Refresh-every-Monday-report-needs-to-show-last-4-weeks-starting/m-p/2829875#M90112</guid>
      <dc:creator>whatisdata96</dc:creator>
      <dc:date>2022-10-10T04:32:18Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh every Monday - report needs to show last 4 weeks starting that past Friday. How?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Refresh-every-Monday-report-needs-to-show-last-4-weeks-starting/m-p/2829888#M90114</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I tried to create a sample pbix file like below.&lt;/P&gt;
&lt;P&gt;Please check the below picture and the attached pbix file whether it suits your requirement.&lt;/P&gt;
&lt;P&gt;I hope the below can provide some ideas on how to create a solution for your datamodel.&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;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Recent 4 weeks qty: =
VAR _today =
    TODAY ()
VAR _newtable =
    FILTER ( ALL ( 'Calendar'[End of Week] ), 'Calendar'[End of Week] &amp;lt; _today )
VAR _top4table =
    TOPN ( 4, _newtable, 'Calendar'[End of Week], DESC )
RETURN
    CALCULATE ( [QTY total:], KEEPFILTERS ( _top4table ) )
&lt;/LI-CODE&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, 10 Oct 2022 04:48:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Refresh-every-Monday-report-needs-to-show-last-4-weeks-starting/m-p/2829888#M90114</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-10-10T04:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh every Monday - report needs to show last 4 weeks starting that past Friday. How?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Refresh-every-Monday-report-needs-to-show-last-4-weeks-starting/m-p/2829965#M90119</link>
      <description>&lt;P&gt;Thank you so much for replying. I have done exactly as you did and something odd came up..&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see, I created 2 pivot tables. On the left, I used the normal date column (in dimCalendar) and it looks like it has all of the correct numbers.&lt;BR /&gt;&lt;BR /&gt;On the right side, I'm using the calculated column I made to group all aggregation by End of Week (Friday) Why am I getting repeat values like this?&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2022 06:00:47 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Refresh-every-Monday-report-needs-to-show-last-4-weeks-starting/m-p/2829965#M90119</guid>
      <dc:creator>whatisdata96</dc:creator>
      <dc:date>2022-10-10T06:00:47Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh every Monday - report needs to show last 4 weeks starting that past Friday. How?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Refresh-every-Monday-report-needs-to-show-last-4-weeks-starting/m-p/2829967#M90120</link>
      <description>&lt;P&gt;Is it because my end of week calculated column was done inccorectly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is how I made that column if it makes any difference:&amp;nbsp;=dimCalendar[Date] - MOD(dimCalendar[Date]-0, 7) + 6&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2022 06:03:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Refresh-every-Monday-report-needs-to-show-last-4-weeks-starting/m-p/2829967#M90120</guid>
      <dc:creator>whatisdata96</dc:creator>
      <dc:date>2022-10-10T06:03:13Z</dc:date>
    </item>
    <item>
      <title>Re: Refresh every Monday - report needs to show last 4 weeks starting that past Friday. How?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Refresh-every-Monday-report-needs-to-show-last-4-weeks-starting/m-p/2829968#M90121</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;Please share your sample pbix file's link, and then I can try to look into it to come up with a more accurate solution for your datamodel.&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Oct 2022 06:03:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Refresh-every-Monday-report-needs-to-show-last-4-weeks-starting/m-p/2829968#M90121</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2022-10-10T06:03:57Z</dc:date>
    </item>
  </channel>
</rss>

