<?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 Need help to get last 10 FYs data to YTD in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-get-last-10-FYs-data-to-YTD/m-p/2372184#M60913</link>
    <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I have requirement like below.&lt;/P&gt;&lt;P&gt;1.Having FY calender table having columns like Date, FY year, FY month, FY quarter, FY Week number.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Note:- FY starts from Jul 1st to Jun 30th every year.&lt;/P&gt;&lt;P&gt;2. Sales table . based on one column i mapped from FY table to this table.&lt;/P&gt;&lt;P&gt;3.currently i should show last 10 FY data in matrics.&amp;nbsp; i mean today is suppose Jan-03-2022 so i should show all years data to till same day&amp;nbsp; respect to year. for FY19 data should be till Jan-03-2020, FY20 be like Jan-03-2021.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ways please let me know&lt;/P&gt;</description>
    <pubDate>Thu, 03 Mar 2022 09:07:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-03-03T09:07:32Z</dc:date>
    <item>
      <title>Need help to get last 10 FYs data to YTD</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-get-last-10-FYs-data-to-YTD/m-p/2372184#M60913</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;I have requirement like below.&lt;/P&gt;&lt;P&gt;1.Having FY calender table having columns like Date, FY year, FY month, FY quarter, FY Week number.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Note:- FY starts from Jul 1st to Jun 30th every year.&lt;/P&gt;&lt;P&gt;2. Sales table . based on one column i mapped from FY table to this table.&lt;/P&gt;&lt;P&gt;3.currently i should show last 10 FY data in matrics.&amp;nbsp; i mean today is suppose Jan-03-2022 so i should show all years data to till same day&amp;nbsp; respect to year. for FY19 data should be till Jan-03-2020, FY20 be like Jan-03-2021.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ways please let me know&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 09:07:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-get-last-10-FYs-data-to-YTD/m-p/2372184#M60913</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-03-03T09:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Need help to get last 10 FYs data to YTD</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-get-last-10-FYs-data-to-YTD/m-p/2372260#M60921</link>
      <description>&lt;P&gt;Anonymous&lt;/LI-USER&gt; , Try like&lt;/P&gt;
&lt;P&gt;Make sure you have the day of the year as column in the date table&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;day of year = datediff( if(month([Date]) &amp;lt;7, Date(year(_max)-1,7,1) , Date(year([Date]),7,1)) , [Date] ,day)+1&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;YTD Corrected = &lt;BR /&gt;var _max =allselected('Date'),'Date'[Date])&lt;/P&gt;
&lt;P&gt;Var _day = datediff( if(month(_max) &amp;lt;7, Date(year(_max)-1,7,1) , Date(year(_max),7,1)) , _max ,day) +1 &lt;BR /&gt;return&lt;BR /&gt;calculate(Sum('order'[Qty]),DATESYTD('Date'[Date], "6/30"),'Date'[Day of year ]&amp;lt;=_day)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;YTD= CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Year]=max('Date'[Year]) &amp;amp;&amp;amp; 'Date'[Day of Year] &amp;lt;= Max('Date'[Day of Year]) ))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;LYTD = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Year]=max('Date'[Year])-1 &amp;amp;&amp;amp; 'Date'[Day of Year] &amp;lt;= Max('Date'[Day of Year])))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 09:39:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Need-help-to-get-last-10-FYs-data-to-YTD/m-p/2372260#M60921</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-03-03T09:39:57Z</dc:date>
    </item>
  </channel>
</rss>

