<?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: grouping dates dynamically in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grouping-dates-dynamically/m-p/755930#M2998</link>
    <description>&lt;P&gt;hmm, bins are essentially an additional UI to create a calculated column. Calculated columns do not change based on a slicer changes, only when the table is refreshed.&lt;/P&gt;
&lt;P&gt;Now you can write DAX that would group the column differently at every refresh (e.g. last 14 days with current date always at the start), see below&lt;/P&gt;
&lt;PRE&gt;Column = "Fortnight " &amp;amp; INT(DIVIDE('Calendar'[Date] - TODAY(),14))&lt;/PRE&gt;
&lt;P&gt;but you only a measure can change based on a slicer selection&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;so ideally you would like to select e.g. Feb 2019, and a barchart would display data for Nov 2018-Jan 2019?&lt;BR /&gt;what would you do with the fortnight bins in this scenario?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Aug 2019 05:01:57 GMT</pubDate>
    <dc:creator>Stachu</dc:creator>
    <dc:date>2019-08-02T05:01:57Z</dc:date>
    <item>
      <title>grouping dates dynamically</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grouping-dates-dynamically/m-p/752160#M2830</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I want to be able to group dates into a list where each value contains a range of 14 days (fortnight period), however, i need it to be done dynamically. Any idea how to do that?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I know that you can manually go and create groups, but i want it to dynamically create groups of 14 days.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks all&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 05:35:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grouping-dates-dynamically/m-p/752160#M2830</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-30T05:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: grouping dates dynamically</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grouping-dates-dynamically/m-p/752637#M2844</link>
      <description>&lt;P&gt;I don't understand what does dynamically mean in this context - when would it change?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 30 Jul 2019 11:25:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grouping-dates-dynamically/m-p/752637#M2844</guid>
      <dc:creator>Stachu</dc:creator>
      <dc:date>2019-07-30T11:25:35Z</dc:date>
    </item>
    <item>
      <title>Re: grouping dates dynamically</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grouping-dates-dynamically/m-p/753491#M2883</link>
      <description>&lt;P&gt;Ideally, when i select a date on a slicer, i want it to show me 3 months before that date but i was wondering if it's possible to, when selected, the view of the previous 3 months is shown in a bar or line chart and the dates that occur in those three months has grouped into fortnight groups.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2019 06:09:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grouping-dates-dynamically/m-p/753491#M2883</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-07-31T06:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: grouping dates dynamically</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grouping-dates-dynamically/m-p/755930#M2998</link>
      <description>&lt;P&gt;hmm, bins are essentially an additional UI to create a calculated column. Calculated columns do not change based on a slicer changes, only when the table is refreshed.&lt;/P&gt;
&lt;P&gt;Now you can write DAX that would group the column differently at every refresh (e.g. last 14 days with current date always at the start), see below&lt;/P&gt;
&lt;PRE&gt;Column = "Fortnight " &amp;amp; INT(DIVIDE('Calendar'[Date] - TODAY(),14))&lt;/PRE&gt;
&lt;P&gt;but you only a measure can change based on a slicer selection&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;so ideally you would like to select e.g. Feb 2019, and a barchart would display data for Nov 2018-Jan 2019?&lt;BR /&gt;what would you do with the fortnight bins in this scenario?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Aug 2019 05:01:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grouping-dates-dynamically/m-p/755930#M2998</guid>
      <dc:creator>Stachu</dc:creator>
      <dc:date>2019-08-02T05:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: grouping dates dynamically</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grouping-dates-dynamically/m-p/2601193#M75184</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can I do this but calculate it every 28days?&amp;nbsp; I have tried below as I want 28 day periods and the column to indicate the Period Number.&amp;nbsp; I had a go but because new to DAX its not working.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Period No = &lt;/SPAN&gt;&lt;SPAN&gt;"Period Number "&lt;/SPAN&gt;&lt;SPAN&gt; &amp;amp; &lt;/SPAN&gt;&lt;SPAN&gt;INT&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;DIVIDE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Procurement Data'[DateOfVisit]&lt;/SPAN&gt;&lt;SPAN&gt; - &lt;/SPAN&gt;&lt;SPAN&gt;12&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;11&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;2021&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;28&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;What I want is a column that identifies the Period Number based on the DateofVist but instead of having to type the dates in each year I just want the system to calculate the periods for the year and then after Period 13 go back to period 1 based on a 28 day cycle.&amp;nbsp; Here is the table below&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;img /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Column = "Fortnight " &amp;amp; INT(DIVIDE('Calendar'[Date] - TODAY(),14))&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Jun 2022 18:26:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/grouping-dates-dynamically/m-p/2601193#M75184</guid>
      <dc:creator>spandy34</dc:creator>
      <dc:date>2022-06-24T18:26:15Z</dc:date>
    </item>
  </channel>
</rss>

