<?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: 2 Weeks range dynamic matrix header filter by date range in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/2-Weeks-range-dynamic-matrix-header-filter-by-date-range/m-p/4663329#M178577</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="337242" data-lia-user-login="SUMESHKUMAR22" class="lia-mention lia-mention-user"&gt;SUMESHKUMAR22&lt;/a&gt; , Change the start of Year to April&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if(month([Date])&amp;lt;=3, EOMONTH([Date],-1*(month([Date])+ 9)) ,EOMONTH([Date],-1*month([Date])+3 ) )+1 &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For Monday Week Start &lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;Start of Week Year = [FY Start] - weekday([FY Start],2) +1&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 22 Apr 2025 13:57:27 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2025-04-22T13:57:27Z</dc:date>
    <item>
      <title>2 Weeks range dynamic matrix header filter by date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/2-Weeks-range-dynamic-matrix-header-filter-by-date-range/m-p/4661669#M178515</link>
      <description>&lt;P&gt;Hi BI experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm looking for help about the date filter challenge in power bi. &lt;STRONG&gt;Thanks in advance!&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Usecase&lt;/STRONG&gt;:&lt;BR /&gt;I'm using the WeekStart - WeekEnd as WeekRange in my date table as the column header of a matrix. Meanwhile, I have a date range slicer for the content in matrix.&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I'm trying to get is to make the 2-weeks range can be also change as per the date slicer.&lt;/P&gt;&lt;P&gt;for e.g, if I select from 3Mar'25 - 21Mar'25 in the date slider the first column should show sum(values) from 3/25 - 15/25 (i.e. last2weeks) and the last column header to be 3/16 - 3/21&amp;nbsp;&lt;SPAN&gt;(i.e. previous2weeks), though it should be 3/16 - 3/29 in the header as we are taking sun-sat calendar wise but we will not because we are selecting till 3/21 in date range so will calculate till 3/21 for last column.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Apr 2025 18:01:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/2-Weeks-range-dynamic-matrix-header-filter-by-date-range/m-p/4661669#M178515</guid>
      <dc:creator>SUMESHKUMAR22</dc:creator>
      <dc:date>2025-04-21T18:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: 2 Weeks range dynamic matrix header filter by date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/2-Weeks-range-dynamic-matrix-header-filter-by-date-range/m-p/4661962#M178524</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="337242" data-lia-user-login="SUMESHKUMAR22" class="lia-mention lia-mention-user"&gt;SUMESHKUMAR22&lt;/a&gt; , check if these columns and measures can help &lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;fortnight&lt;BR /&gt;Start of year = eomonth([Date], -1*month([Date]))+1 &lt;BR /&gt;Start of Week Year = [Start of year] - weekday([Start of year]) +1&lt;BR /&gt;Week Start = [Date] - weekday([Date]) +1&lt;/P&gt;
&lt;P&gt;fortnight = quotient(Datediff([Week Start], [Start of Week Year], day),7)+1&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;fortnight = quotient(Datediff([Start of year], [date], day),7)+1&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Year fortnight= year([Start of Week Year])*100 + [fortnight])&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;Year fortnight= year([Start of year])*100 + [fortnight])&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;fortnight rank = RANKX('Date','Date'[Year fortnight],,ASC,Dense) //YYYYWW format&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;These measures can help&lt;BR /&gt;This fortnight = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[fortnight rank]=max('Date'[fortnight rank])))&lt;BR /&gt;Last fortnight = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[fortnight rank]=max('Date'[fortnight rank])-1))&lt;/P&gt;</description>
      <pubDate>Mon, 21 Apr 2025 23:24:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/2-Weeks-range-dynamic-matrix-header-filter-by-date-range/m-p/4661962#M178524</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2025-04-21T23:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: 2 Weeks range dynamic matrix header filter by date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/2-Weeks-range-dynamic-matrix-header-filter-by-date-range/m-p/4661988#M178528</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi &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;, Sure will check. Thanks for the prompt response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I just got the requirement change from endusers &amp;amp; now they are expecting like below SS.&lt;/P&gt;&lt;P&gt;E.g. if they select from 3/30 - 4/19 (as shown example)&amp;nbsp;then the matrix should show 3 columns headers which is showing start of week date for each week as you can see in the mockup. And suppose&amp;nbsp;&lt;SPAN&gt;If the user selects:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3/31/25 – 4/19/25,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;then group like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;SPAN&gt;3/31–4/6 → “Mar 31 ’25”&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;4/7–4/13 → “Apr 7 ’25”&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN&gt;4/14–4/19 → “Apr 14 ’25”&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;SPAN&gt;So it’s not aligned to a calendar week, but chunks of 7 days from the start of selected range.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope you got the dynamic header adjustments.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;let me know a approach for this.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 01:44:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/2-Weeks-range-dynamic-matrix-header-filter-by-date-range/m-p/4661988#M178528</guid>
      <dc:creator>SUMESHKUMAR22</dc:creator>
      <dc:date>2025-04-22T01:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: 2 Weeks range dynamic matrix header filter by date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/2-Weeks-range-dynamic-matrix-header-filter-by-date-range/m-p/4662969#M178561</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;Hi Amit,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;If you see the SS, the date range filtered : its starting as mon- sun because of that its taking first column as 24march’25 but user wants the first column should be 30march’25..so whatever he selects it will be the start week ..so in this way the dynamic nature is impossible to handle.&lt;BR /&gt;Correct? Or any other way ?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 22 Apr 2025 11:05:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/2-Weeks-range-dynamic-matrix-header-filter-by-date-range/m-p/4662969#M178561</guid>
      <dc:creator>SUMESHKUMAR22</dc:creator>
      <dc:date>2025-04-22T11:05:22Z</dc:date>
    </item>
    <item>
      <title>Re: 2 Weeks range dynamic matrix header filter by date range</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/2-Weeks-range-dynamic-matrix-header-filter-by-date-range/m-p/4663329#M178577</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="337242" data-lia-user-login="SUMESHKUMAR22" class="lia-mention lia-mention-user"&gt;SUMESHKUMAR22&lt;/a&gt; , Change the start of Year to April&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if(month([Date])&amp;lt;=3, EOMONTH([Date],-1*(month([Date])+ 9)) ,EOMONTH([Date],-1*month([Date])+3 ) )+1 &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For Monday Week Start &lt;/P&gt;
&lt;DIV&gt;
&lt;DIV&gt;Start of Week Year = [FY Start] - weekday([FY Start],2) +1&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 22 Apr 2025 13:57:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/2-Weeks-range-dynamic-matrix-header-filter-by-date-range/m-p/4663329#M178577</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2025-04-22T13:57:27Z</dc:date>
    </item>
  </channel>
</rss>

