<?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: Calculation of Quartes in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-Quartes/m-p/1511452#M29370</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="272202" data-lia-user-login="Carlo1975" class="lia-mention lia-mention-user"&gt;Carlo1975&lt;/a&gt; , Create a new column like &lt;/P&gt;
&lt;P&gt;Switch( true(),&lt;BR /&gt;[First Date]&amp;lt;[Second Date], 0 ,&lt;BR /&gt;[First Date]=[Second Date], 1 ,&lt;BR /&gt;[First Date]&amp;gt;[Second Date], 2 &lt;BR /&gt;)&lt;/P&gt;</description>
    <pubDate>Mon, 23 Nov 2020 15:21:28 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2020-11-23T15:21:28Z</dc:date>
    <item>
      <title>Calculation of Quartes</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-Quartes/m-p/1511257#M29361</link>
      <description>&lt;P&gt;Hi everyone, I have a problem, that is, I should calculate the quarters with respect to connected columns. The columns are Name, first date and second date.I think that is very difficult, but I try to explain&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The First and the second Date aren’t in order&lt;/LI&gt;&lt;LI&gt;2) The quarter is equal to 0 as long as the first date is less than the second date. After that, when the first date is equal to or greater than the second date, I start counting the quarters based on the first date. In the example 30/06/2018 is the date to start calculating the first quarter and in fact it is equal to 1. After the 3 months, in the example it is 30/10/2018 it becomes quarter 2 .... so until the end&lt;/LI&gt;&lt;LI&gt;When the name changes, we start from scratch again.&lt;/LI&gt;&lt;/UL&gt;&lt;TABLE&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D&gt;31/05/2018&lt;/TD&gt;&lt;TD&gt;30/06/18&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;YYYYYYYY&lt;/TD&gt;&lt;TD&gt;31/05/2018&lt;/TD&gt;&lt;TD&gt;30/06/18&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;YYYYYYYY&lt;/TD&gt;&lt;TD&gt;31/05/2018&lt;/TD&gt;&lt;TD&gt;30/06/18&lt;/TD&gt;&lt;TD&gt;0&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;Carlo&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 14:08:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-Quartes/m-p/1511257#M29361</guid>
      <dc:creator>Carlo1975</dc:creator>
      <dc:date>2020-11-23T14:08:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of Quartes</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-Quartes/m-p/1511452#M29370</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="272202" data-lia-user-login="Carlo1975" class="lia-mention lia-mention-user"&gt;Carlo1975&lt;/a&gt; , Create a new column like &lt;/P&gt;
&lt;P&gt;Switch( true(),&lt;BR /&gt;[First Date]&amp;lt;[Second Date], 0 ,&lt;BR /&gt;[First Date]=[Second Date], 1 ,&lt;BR /&gt;[First Date]&amp;gt;[Second Date], 2 &lt;BR /&gt;)&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 15:21:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-Quartes/m-p/1511452#M29370</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-11-23T15:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Calculation of Quartes</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-Quartes/m-p/1511541#M29373</link>
      <description>&lt;P&gt;I'm sorry but is wrong...if you look my example, when the first date is 30/10/2018, the quarter is 2, but, if for example I have also another data like 31/01/2019, the quarter will be 3, and if I have also 31/04/2019 the quarter will be 4....and so on until the name change. Each 3 month, from the first date is equal or greater than the second date, I have to add 1 (quarter 1, quarter 2, quarter 3, quarter 4, quarter 5, etc.)&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 15:57:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculation-of-Quartes/m-p/1511541#M29373</guid>
      <dc:creator>Carlo1975</dc:creator>
      <dc:date>2020-11-23T15:57:09Z</dc:date>
    </item>
  </channel>
</rss>

