<?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: Last Fiscal quarter in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-Fiscal-quarter/m-p/2510159#M69602</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="387395" data-lia-user-login="Mohan_sc" class="lia-mention lia-mention-user"&gt;Mohan_sc&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you can try to create a DimDate table by calendar() or calendarauto() function, then use&amp;nbsp;&lt;SPAN&gt;PREVIOUSQUARTER function.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DimDate = 
VAR _Basic =
    ADDCOLUMNS (
        CALENDARAUTO (),
        "Year", YEAR ( [Date] ),
        "Qtr", QUARTER ( [Date] ),
        "Month", MONTH ( [Date] )
    )
VAR _ADD_Fiscal =
    ADDCOLUMNS (
        _Basic,
        "Fiscal Year",
            IF ( [Month] &amp;gt;= 4, [Year], [Year] - 1 ),
        "Fiscal Qtr", IF ( [Month] &amp;gt;= 4, [Qtr]-1, 4 )
    )
RETURN
    _ADD_Fiscal&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;If 'in'[submit_my - Copy] is a datetime format column, you can add a date only format calculated column by DATEVALUE function. Then create a relationship between 'in'[Date] and 'Dimdate'[Date].&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Last QT Ticket = CALCULATE(COUNTA('in'[ticket_number]), PREVIOUSQUARTER(DimDate[Date]))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;Result is as below.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 May 2022 09:46:25 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-05-12T09:46:25Z</dc:date>
    <item>
      <title>Last Fiscal quarter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-Fiscal-quarter/m-p/2501546#M69161</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hello, I have fiscal calender. I want to show data for last 1 quarter. Client fiscal quarter start for April.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I've currently&amp;nbsp; using&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;"Last QT Ticket = &lt;/SPAN&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;COUNTA&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'in'[ticket_number]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;DATEADD&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'in'[submit_my - Copy]&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;[Date]&lt;/SPAN&gt;&lt;SPAN&gt;,-&lt;/SPAN&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;QUARTER&lt;/SPAN&gt;&lt;SPAN&gt;))".&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;if any other calculation is ther let me know.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Mohan&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Mon, 09 May 2022 09:08:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-Fiscal-quarter/m-p/2501546#M69161</guid>
      <dc:creator>Mohan_sc</dc:creator>
      <dc:date>2022-05-09T09:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: Last Fiscal quarter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-Fiscal-quarter/m-p/2501616#M69165</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="387395" data-lia-user-login="Mohan_sc" class="lia-mention lia-mention-user"&gt;Mohan_sc&lt;/a&gt; , As long as Qtr start from Jan,Apr, JUL and Oct, These should work&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Qtr Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(ENDOFQUARTER('Date'[Date])))&lt;/P&gt;
&lt;P&gt;Last QUARTER Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD( ENDOFQUARTER(dateadd('Date'[Date],-1,QUARTER))))&lt;BR /&gt;Last QUARTER Sales = CALCULATE(SUM(Sales[Sales Amount]),PREVIOUSQUARTER(('Date'[Date])))&lt;/P&gt;
&lt;P&gt;Last to last QTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESQTD(dateadd('Date'[Date],-2,QUARTER)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period, &lt;BR /&gt;Custom Period till date: &lt;A href="https://youtu.be/aU2aKbnHuWs&amp;amp;t=145s" target="_blank"&gt;https://youtu.be/aU2aKbnHuWs&amp;amp;t=145s&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Power BI — Qtr on Qtr with or Without Time Intelligence &lt;BR /&gt;&lt;A href="https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839" target="_blank"&gt;https://medium.com/@amitchandak.1978/power-bi-qtd-questions-time-intelligence-2-5-d842063da839&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=8-TlVx7P0A0" target="_blank"&gt;https://www.youtube.com/watch?v=8-TlVx7P0A0&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 09 May 2022 09:41:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-Fiscal-quarter/m-p/2501616#M69165</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2022-05-09T09:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Last Fiscal quarter</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-Fiscal-quarter/m-p/2510159#M69602</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="387395" data-lia-user-login="Mohan_sc" class="lia-mention lia-mention-user"&gt;Mohan_sc&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think you can try to create a DimDate table by calendar() or calendarauto() function, then use&amp;nbsp;&lt;SPAN&gt;PREVIOUSQUARTER function.&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DimDate = 
VAR _Basic =
    ADDCOLUMNS (
        CALENDARAUTO (),
        "Year", YEAR ( [Date] ),
        "Qtr", QUARTER ( [Date] ),
        "Month", MONTH ( [Date] )
    )
VAR _ADD_Fiscal =
    ADDCOLUMNS (
        _Basic,
        "Fiscal Year",
            IF ( [Month] &amp;gt;= 4, [Year], [Year] - 1 ),
        "Fiscal Qtr", IF ( [Month] &amp;gt;= 4, [Qtr]-1, 4 )
    )
RETURN
    _ADD_Fiscal&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;If 'in'[submit_my - Copy] is a datetime format column, you can add a date only format calculated column by DATEVALUE function. Then create a relationship between 'in'[Date] and 'Dimdate'[Date].&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Last QT Ticket = CALCULATE(COUNTA('in'[ticket_number]), PREVIOUSQUARTER(DimDate[Date]))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN&gt;Result is as below.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 May 2022 09:46:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Last-Fiscal-quarter/m-p/2510159#M69602</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-05-12T09:46:25Z</dc:date>
    </item>
  </channel>
</rss>

