<?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: How to convert weekly dates to fortnightly dates in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-weekly-dates-to-fortnightly-dates/m-p/2282047#M55853</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="351555" data-lia-user-login="Michaelc1993" class="lia-mention lia-mention-user"&gt;Michaelc1993&lt;/a&gt; , Try a new column like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;New column &lt;BR /&gt;VAR __BaseDate = DATE(2021,1,6)&lt;BR /&gt;return &lt;BR /&gt;quotient(datediff(__BaseDate,[Date],day),14) +1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if we need a yearly reset, we have start using week year start date, in place of DATE(2021,1,6)&lt;/P&gt;
&lt;P&gt;Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1&lt;/P&gt;
&lt;P&gt;Week Start Year = minx(filter('Date',[Year] =earlier([Year])),[Week Start date])&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jan 2022 16:07:48 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2022-01-13T16:07:48Z</dc:date>
    <item>
      <title>How to convert weekly dates to fortnightly dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-weekly-dates-to-fortnightly-dates/m-p/2281781#M55841</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its my first post in the forum so apologies if the post is posted incorrectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to convert weekly dates to fortnightly dates. While this sounds simple - I cant seem to get it working. I know there was a similar post:&amp;nbsp;&lt;A href="https://community.powerbi.com/t5/DAX-Commands-and-Tips/Grouping-dates-into-fortnights/m-p/949837" target="_blank"&gt;https://community.powerbi.com/t5/DAX-Commands-and-Tips/Grouping-dates-into-fortnights/m-p/949837&lt;/A&gt;&amp;nbsp;but this didnt quite work for me as the numbers didn't while line up.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the data I have which goes up to 2023 (see below). I essentially want the 'Fortnight' column to show 06/01/21 for the first period. Then from 7/01/21 - 20/01/21 to show as 20/01/21 and 03/02/21 for the next 2 week period and so on.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I intially tried&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;EM&gt;"Fortnight = &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR __BaseDate = DATE(2021,1,6)&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;VAR __2w = (__BaseDate) +14&lt;/EM&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;EM&gt;RETURN&lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;EM&gt;if(Dates[Date]&amp;lt;=__BaseDate,__BaseDate,__2w)" &lt;/EM&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;but ovbiously this only works for the first period. wondering if some sort of loop could be made using this? or another simpler method altogether?&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&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;Any help would be greatly appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 14:17:05 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-weekly-dates-to-fortnightly-dates/m-p/2281781#M55841</guid>
      <dc:creator>Michaelc1993</dc:creator>
      <dc:date>2022-01-13T14:17:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert weekly dates to fortnightly dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-weekly-dates-to-fortnightly-dates/m-p/2282047#M55853</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="351555" data-lia-user-login="Michaelc1993" class="lia-mention lia-mention-user"&gt;Michaelc1993&lt;/a&gt; , Try a new column like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;New column &lt;BR /&gt;VAR __BaseDate = DATE(2021,1,6)&lt;BR /&gt;return &lt;BR /&gt;quotient(datediff(__BaseDate,[Date],day),14) +1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if we need a yearly reset, we have start using week year start date, in place of DATE(2021,1,6)&lt;/P&gt;
&lt;P&gt;Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1&lt;/P&gt;
&lt;P&gt;Week Start Year = minx(filter('Date',[Year] =earlier([Year])),[Week Start date])&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 16:07:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-convert-weekly-dates-to-fortnightly-dates/m-p/2282047#M55853</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-01-13T16:07:48Z</dc:date>
    </item>
  </channel>
</rss>

