<?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 Variable financial year in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-financial-year/m-p/2222097#M52794</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My company uses accounting periods that end on the last Friday of the month.&amp;nbsp; This means that the start of the financial year is variable. Eg. This financial year (2022) began on the 26/6/2021 and financial year (2023) will begin on the 25/6/2021.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When writing YTD calculations, I have to input a string to define the end of the financial year eg&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TOTALYTD([Actuals],DimDateandPeriod[Date],ALL(DimDateandPeriod[Date]),"6/30")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;but this then puts the calcuation off by a few days.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I have tried to make a dynamic column to insert instead of&amp;nbsp;"6/30" but the YTD function will not accept it.&amp;nbsp; I have a column in my date table which holds the first day of the financial year and tried doing a calculate between dates of that date and today but that doesn't work either. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Does anyone have any other ideas of how to get around this problem?&amp;nbsp; Is there a long hand way of writing YTD where I can have dynamic dates?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Mon, 06 Dec 2021 06:18:00 GMT</pubDate>
    <dc:creator>Mo-PHAT</dc:creator>
    <dc:date>2021-12-06T06:18:00Z</dc:date>
    <item>
      <title>Variable financial year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-financial-year/m-p/2222097#M52794</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My company uses accounting periods that end on the last Friday of the month.&amp;nbsp; This means that the start of the financial year is variable. Eg. This financial year (2022) began on the 26/6/2021 and financial year (2023) will begin on the 25/6/2021.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When writing YTD calculations, I have to input a string to define the end of the financial year eg&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;TOTALYTD([Actuals],DimDateandPeriod[Date],ALL(DimDateandPeriod[Date]),"6/30")&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;but this then puts the calcuation off by a few days.&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;I have tried to make a dynamic column to insert instead of&amp;nbsp;"6/30" but the YTD function will not accept it.&amp;nbsp; I have a column in my date table which holds the first day of the financial year and tried doing a calculate between dates of that date and today but that doesn't work either. &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Does anyone have any other ideas of how to get around this problem?&amp;nbsp; Is there a long hand way of writing YTD where I can have dynamic dates?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 06 Dec 2021 06:18:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-financial-year/m-p/2222097#M52794</guid>
      <dc:creator>Mo-PHAT</dc:creator>
      <dc:date>2021-12-06T06:18:00Z</dc:date>
    </item>
    <item>
      <title>Re: Variable financial year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-financial-year/m-p/2222191#M52797</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="18606" data-lia-user-login="Mo-PHAT" class="lia-mention lia-mention-user"&gt;Mo-PHAT&lt;/a&gt; , You need two things for YTD&lt;/P&gt;
&lt;P&gt;Year and Day of year.&lt;/P&gt;
&lt;P&gt;I am assuming you have logic for you start date, based on that You can create year. Numeric year.&lt;/P&gt;
&lt;P&gt;Else create a rank on Start date of year&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Year Rank = Rankx('Date', 'Date'[Start of Year],,asc,dense)&lt;/P&gt;
&lt;P&gt;Day of year = Datediff([Start of year], [Date], day())&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;YTD= CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Year Rank]=max('Date'[Year Rank]) &amp;amp;&amp;amp; 'Date'[Day of Year] &amp;lt;= Max('Date'[Day of Year]) ))&lt;BR /&gt;LYTD = CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Year Rank]=max('Date'[Year Rank])-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;
&lt;P&gt;Power BI — Year on Year with or Without Time Intelligence &lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a" target="_blank"&gt;https://medium.com/@amitchandak.1978/power-bi-ytd-questions-time-intelligence-1-5-e3174b39f38a&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=km41KfM_0uA" target="_blank"&gt;https://www.youtube.com/watch?v=km41KfM_0uA&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 07:09:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-financial-year/m-p/2222191#M52797</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-12-06T07:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: Variable financial year</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-financial-year/m-p/2224003#M52899</link>
      <description>&lt;P&gt;Thanks heaps&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That works a treat &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 00:08:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Variable-financial-year/m-p/2224003#M52899</guid>
      <dc:creator>Mo-PHAT</dc:creator>
      <dc:date>2021-12-07T00:08:54Z</dc:date>
    </item>
  </channel>
</rss>

