<?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: SAMEPERIOD 2 YEARS BACK H2 AND LASTYEAR H1 QUANTITY CALCULATION in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIOD-2-YEARS-BACK-H2-AND-LASTYEAR-H1-QUANTITY-CALCULATION/m-p/1482789#M28331</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="269433" data-lia-user-login="Gopimadhaiyan" class="lia-mention lia-mention-user"&gt;Gopimadhaiyan&lt;/a&gt; , Not very clear. You need to have the following column in the date table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Start Year = STARTOFYEAR('Date'[Date],"12/31")&lt;BR /&gt;Half = Half = if(datediff([start year],[Date],month)&amp;lt;6,1,2)&lt;BR /&gt;Half Year = [Start Year]*100 + [Half]&lt;BR /&gt;Half Year Rank = RANKX(all('Date'),'Date'[Half Year Start],,ASC,Dense)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And measures like &lt;BR /&gt;This Half Year = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Half Year Rank]=max('Date'[Half Year Rank])))&lt;BR /&gt;Last Half Year = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Half Year Rank]=max('Date'[Half Year Rank])-1))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2019 ist is 3 or 4 half year back&lt;/P&gt;
&lt;P&gt;3rd Last Half Year = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Half Year Rank]=max('Date'[Half Year Rank])-3))&lt;/P&gt;
&lt;P&gt;4th Last Half Year = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Half Year Rank]=max('Date'[Half Year Rank])-4))&lt;/P&gt;
&lt;P&gt;5th Last Half Year = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Half Year Rank]=max('Date'[Half Year Rank])-5))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also a measure like this should also help&lt;/P&gt;
&lt;P&gt;Half Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-6,Month))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank" rel="noopener"&gt;radacad&lt;/A&gt; &lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank" rel="noopener"&gt;sqlbi&lt;/A&gt; &lt;A href="https://www.youtube.com/playlist?list=PLPaNVDMhUXGYLz-w8ERQOo3KYARs7GgG-" target="_blank" rel="noopener"&gt;My Video Series&lt;/A&gt; Appreciate your Kudos. &lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 09 Nov 2020 13:04:46 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2020-11-09T13:04:46Z</dc:date>
    <item>
      <title>SAMEPERIOD 2 YEARS BACK H2 AND LASTYEAR H1 QUANTITY CALCULATION</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIOD-2-YEARS-BACK-H2-AND-LASTYEAR-H1-QUANTITY-CALCULATION/m-p/1482744#M28329</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Pls help me to find out the DAX calcuation to calculate the&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FISCAL YEAR 2018 - H2 &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FISCAL YEAR 2019 - H1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;in sequence to see the whole 12 months calculation in &lt;/SPAN&gt;&lt;SPAN&gt;FISCAL YEAR 2020&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Request you to help me pls&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 09 Nov 2020 12:32:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIOD-2-YEARS-BACK-H2-AND-LASTYEAR-H1-QUANTITY-CALCULATION/m-p/1482744#M28329</guid>
      <dc:creator>Gopimadhaiyan</dc:creator>
      <dc:date>2020-11-09T12:32:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAMEPERIOD 2 YEARS BACK H2 AND LASTYEAR H1 QUANTITY CALCULATION</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIOD-2-YEARS-BACK-H2-AND-LASTYEAR-H1-QUANTITY-CALCULATION/m-p/1482789#M28331</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="269433" data-lia-user-login="Gopimadhaiyan" class="lia-mention lia-mention-user"&gt;Gopimadhaiyan&lt;/a&gt; , Not very clear. You need to have the following column in the date table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Start Year = STARTOFYEAR('Date'[Date],"12/31")&lt;BR /&gt;Half = Half = if(datediff([start year],[Date],month)&amp;lt;6,1,2)&lt;BR /&gt;Half Year = [Start Year]*100 + [Half]&lt;BR /&gt;Half Year Rank = RANKX(all('Date'),'Date'[Half Year Start],,ASC,Dense)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And measures like &lt;BR /&gt;This Half Year = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Half Year Rank]=max('Date'[Half Year Rank])))&lt;BR /&gt;Last Half Year = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Half Year Rank]=max('Date'[Half Year Rank])-1))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2019 ist is 3 or 4 half year back&lt;/P&gt;
&lt;P&gt;3rd Last Half Year = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Half Year Rank]=max('Date'[Half Year Rank])-3))&lt;/P&gt;
&lt;P&gt;4th Last Half Year = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Half Year Rank]=max('Date'[Half Year Rank])-4))&lt;/P&gt;
&lt;P&gt;5th Last Half Year = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Half Year Rank]=max('Date'[Half Year Rank])-5))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also a measure like this should also help&lt;/P&gt;
&lt;P&gt;Half Year behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-6,Month))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :&lt;A href="https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions" target="_blank" rel="noopener"&gt;radacad&lt;/A&gt; &lt;A href="https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/" target="_blank" rel="noopener"&gt;sqlbi&lt;/A&gt; &lt;A href="https://www.youtube.com/playlist?list=PLPaNVDMhUXGYLz-w8ERQOo3KYARs7GgG-" target="_blank" rel="noopener"&gt;My Video Series&lt;/A&gt; Appreciate your Kudos. &lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 Nov 2020 13:04:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIOD-2-YEARS-BACK-H2-AND-LASTYEAR-H1-QUANTITY-CALCULATION/m-p/1482789#M28331</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-11-09T13:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: SAMEPERIOD 2 YEARS BACK H2 AND LASTYEAR H1 QUANTITY CALCULATION</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIOD-2-YEARS-BACK-H2-AND-LASTYEAR-H1-QUANTITY-CALCULATION/m-p/1484885#M28377</link>
      <description>&lt;P&gt;Thanks sir.&lt;/P&gt;&lt;P&gt;I am still getting error for&amp;nbsp;&lt;SPAN&gt;Half Year Rank = RANKX(all('Date'),'Date'[Half Year Start],,ASC,Dense)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;pls check and suggest.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;My ask is &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Fiscal year = FY19 (SEP-AUG), FY20(SEP-AUG)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I would like to calculate the total quantity for FY21 (H2FY19+H1FY20)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 11:42:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/SAMEPERIOD-2-YEARS-BACK-H2-AND-LASTYEAR-H1-QUANTITY-CALCULATION/m-p/1484885#M28377</guid>
      <dc:creator>Gopimadhaiyan</dc:creator>
      <dc:date>2020-11-10T11:42:06Z</dc:date>
    </item>
  </channel>
</rss>

