<?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: Previous Year Dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/952606#M10750</link>
    <description>Try this post &lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/DAX-Formulas-for-Fiscal-Year-Fiscal-Quarter-and-Month-Short-Name/td-p/18268" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/DAX-Formulas-for-Fiscal-Year-Fiscal-Quarter-and-Month-Short-Name/td-p/18268&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;and then you can read this as well&lt;BR /&gt;&lt;A href="https://www.sqlbi.com/blog/marco/2018/05/22/time-intelligence-issues-in-dax-for-fiscal-years-starting-in-march/" target="_blank"&gt;https://www.sqlbi.com/blog/marco/2018/05/22/time-intelligence-issues-in-dax-for-fiscal-years-starting-in-march/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It might be that the formula I gave you above is different for different FY calendars, so be careful.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D&lt;BR /&gt;</description>
    <pubDate>Fri, 28 Feb 2020 10:04:23 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-02-28T10:04:23Z</dc:date>
    <item>
      <title>Previous Year Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/935222#M9728</link>
      <description>&lt;P&gt;Hi Guys&lt;BR /&gt;I wanted to know how can we calculate Previous fiscal year total sales.Currently my YTD dax is: TOTALYTD(SUM(Table1[Sales]),Date[Date],ALL(Date),"3/31")&lt;BR /&gt;&lt;BR /&gt;Please help&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 09:21:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/935222#M9728</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-17T09:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Year Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/935600#M9765</link>
      <description>&lt;P&gt;Let's assume your current YTD measure works as you would like.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;YTD =&amp;nbsp;&lt;SPAN&gt;TOTALYTD(SUM(Table1[Sales]),Date[Date],ALL(Date),"3/31")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create a New Measure -&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;YTD LY = CALCULATE( YTD, DATEADD( dDATES[DATE], -1, YEAR )&lt;/P&gt;</description>
      <pubDate>Mon, 17 Feb 2020 13:17:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/935600#M9765</guid>
      <dc:creator>AlexAlberga727</dc:creator>
      <dc:date>2020-02-17T13:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Year Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/936574#M9819</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="190980" data-lia-user-login="AlexAlberga727" class="lia-mention lia-mention-user"&gt;AlexAlberga727&lt;/a&gt;Not working its just returning me the previous calendar year .Please note that my YTD measure is working fine according to my FY year.&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 05:40:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/936574#M9819</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-18T05:40:51Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Year Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/937067#M9832</link>
      <description>&lt;P&gt;try sameperiodLastyear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Pravin&lt;/P&gt;</description>
      <pubDate>Tue, 18 Feb 2020 10:36:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/937067#M9832</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-18T10:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Year Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/943658#M10149</link>
      <description>&lt;P&gt;Hello&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try following measures:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Total Orders = SUM(dtTable[Order Quantity])

YTD Orders = CALCULATE([Total Orders],DATESYTD('Calendar'[Date],"3/31"))

YTD Prev Year = CALCULATE([YTD Orders], SAMEPERIODLASTYEAR('Calendar'[Date]))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will give you the desired output.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;BR /&gt;Vivek&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;If it helps, please mark it as a solution&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Kudos would be a cherry on the top &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.vivran.in/" target="_blank"&gt;https://www.vivran.in/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/vivek-ranjan-063a1a17b/" target="_blank"&gt;Connect on LinkedIn&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2020 03:51:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/943658#M10149</guid>
      <dc:creator>vivran22</dc:creator>
      <dc:date>2020-02-22T03:51:37Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Year Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/943750#M10151</link>
      <description>Please, stop using TOTALYTD (or do it if you want to get into trouble). This is not recommended. Please read this article: &lt;A href="https://www.sqlbi.com/blog/marco/2018/08/10/the-hidden-secrets-of-totalytd/" target="_blank"&gt;https://www.sqlbi.com/blog/marco/2018/08/10/the-hidden-secrets-of-totalytd/&lt;/A&gt;</description>
      <pubDate>Sat, 22 Feb 2020 11:08:41 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/943750#M10151</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-22T11:08:41Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Year Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/945804#M10346</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;thanks for the artilce!&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2020 18:55:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/945804#M10346</guid>
      <dc:creator>AlexAlberga727</dc:creator>
      <dc:date>2020-02-24T18:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Year Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/950317#M10619</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="141768" data-lia-user-login="vivran22" class="lia-mention lia-mention-user"&gt;vivran22&lt;/a&gt;&amp;nbsp;Thanks for the solution but again my YTD is coming out correct but the Previous Year is not coming out correct.Can't figure out why&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 05:41:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/950317#M10619</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-27T05:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Year Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/950350#M10620</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp; Can you share the sample data file?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;BR /&gt;Vivek&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://www.vivran.in/" target="_blank"&gt;https://www.vivran.in/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.linkedin.com/in/vivek-ranjan-063a1a17b/" target="_blank"&gt;Connect on LinkedIn&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 06:02:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/950350#M10620</guid>
      <dc:creator>vivran22</dc:creator>
      <dc:date>2020-02-27T06:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Year Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/950542#M10623</link>
      <description>&lt;P&gt;Try This&lt;BR /&gt;&lt;BR /&gt;Hope this will work&lt;BR /&gt;Total Sales LY = CALCULATE( [Total Sales], DATESYTD( Dates[Date] ) )&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 07:55:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/950542#M10623</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-27T07:55:21Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Year Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/951115#M10676</link>
      <description>&lt;P&gt;To be able to carry out fiscal year calculations you have to have a fiscal calendar set up. Once you have it, you can use this formula:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;[Total Sales PFY] =
// There must be a hidden integer field in the Calendar
// called FiscalYearNumber.
var __currentFiscalYear = SELECTEDVALUE( Calendar[FiscalYearNumber] )
var __totalpfy =
	calculate(
		[Total Sales],
		Calendar[FiscalYearNumber] = __fiscalYear - 1
	)
return
	__totalpfy&lt;/LI-CODE&gt;
&lt;P&gt;This is the only way to deal with fiscal calendars - you have to have a proper one in the model and write the logic yourself. There is no fiscal time-intel built-in because there are too many ways to have fiscal calendars set up whereas there is only one standard calendar.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;D&lt;/P&gt;</description>
      <pubDate>Thu, 27 Feb 2020 14:39:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/951115#M10676</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-27T14:39:20Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Year Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/952256#M10739</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;Can you help me creating that table?&lt;/P&gt;</description>
      <pubDate>Fri, 28 Feb 2020 07:22:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/952256#M10739</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-28T07:22:28Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Year Dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/952606#M10750</link>
      <description>Try this post &lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/DAX-Formulas-for-Fiscal-Year-Fiscal-Quarter-and-Month-Short-Name/td-p/18268" target="_blank"&gt;https://community.powerbi.com/t5/Desktop/DAX-Formulas-for-Fiscal-Year-Fiscal-Quarter-and-Month-Short-Name/td-p/18268&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;and then you can read this as well&lt;BR /&gt;&lt;A href="https://www.sqlbi.com/blog/marco/2018/05/22/time-intelligence-issues-in-dax-for-fiscal-years-starting-in-march/" target="_blank"&gt;https://www.sqlbi.com/blog/marco/2018/05/22/time-intelligence-issues-in-dax-for-fiscal-years-starting-in-march/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;It might be that the formula I gave you above is different for different FY calendars, so be careful.&lt;BR /&gt;&lt;BR /&gt;Best&lt;BR /&gt;D&lt;BR /&gt;</description>
      <pubDate>Fri, 28 Feb 2020 10:04:23 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Year-Dax/m-p/952606#M10750</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-02-28T10:04:23Z</dc:date>
    </item>
  </channel>
</rss>

