<?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 Fiscal Year Data by Our own Calendar that may differs every Year on Year and Month on Month in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Fiscal-Year-Data-by-Our-own-Calendar-that-may-differs/m-p/4612477#M176532</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="763724" data-lia-user-login="DharaniPrathap" class="lia-mention lia-mention-user"&gt;DharaniPrathap&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can create a custom date table in Power BI using DAX. Here is an example:&lt;/P&gt;
&lt;P&gt;CustomDateTable = &lt;BR /&gt;ADDCOLUMNS (&lt;BR /&gt;CALENDAR (DATE(2021, 8, 31), DATE(2025, 9, 27)),&lt;BR /&gt;"FiscalYear", &lt;BR /&gt;SWITCH (&lt;BR /&gt;TRUE(),&lt;BR /&gt;[Date] &amp;gt;= DATE(2024, 8, 31) &amp;amp;&amp;amp; [Date] &amp;lt;= DATE(2024, 9, 27), "2025",&lt;BR /&gt;[Date] &amp;gt;= DATE(2023, 9, 2) &amp;amp;&amp;amp; [Date] &amp;lt;= DATE(2023, 9, 29), "2024",&lt;BR /&gt;[Date] &amp;gt;= DATE(2022, 9, 3) &amp;amp;&amp;amp; [Date] &amp;lt;= DATE(2022, 9, 30), "2023",&lt;BR /&gt;[Date] &amp;gt;= DATE(2021, 9, 4) &amp;amp;&amp;amp; [Date] &amp;lt;= DATE(2021, 10, 1), "2022",&lt;BR /&gt;BLANK()&lt;BR /&gt;),&lt;BR /&gt;"FiscalMonth", &lt;BR /&gt;FORMAT([Date], "MMM")&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ensure that your data model uses this custom date table for date-related calculations. You can link it to your fact table based on the date column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, you can create a measure to calculate the previous fiscal year data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PreviousFiscalYearData = &lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUM ( 'YourFactTable'[YourMeasure] ),&lt;BR /&gt;FILTER (&lt;BR /&gt;ALL ( 'CustomDateTable' ),&lt;BR /&gt;'CustomDateTable'[FiscalYear] = &lt;BR /&gt;VALUE ( SELECTEDVALUE ( 'CustomDateTable'[FiscalYear] ) ) - 1&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 17 Mar 2025 09:15:36 GMT</pubDate>
    <dc:creator>bhanu_gautam</dc:creator>
    <dc:date>2025-03-17T09:15:36Z</dc:date>
    <item>
      <title>Previous Fiscal Year Data by Our own Calendar that may differs every Year on Year and Month on Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Fiscal-Year-Data-by-Our-own-Calendar-that-may-differs/m-p/4612401#M176530</link>
      <description>&lt;P&gt;Hello Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need a help on&amp;nbsp;Previous Fiscal Year Data by Our own Calendar that may differs every Year on Year and Month on Month.&lt;/P&gt;&lt;P&gt;Explination :&lt;/P&gt;&lt;P&gt;We have our own Fiscal calender based on weekly data as below,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sep-2025 :&amp;nbsp; 31 Aug-24 to 27 Sep-24&lt;/P&gt;&lt;P&gt;Sep-2024 :&amp;nbsp; 02 Sep-23 to 29 Sep-23&lt;/P&gt;&lt;P&gt;Sep-2023 :&amp;nbsp; 03 Sep-22 to 30 Sep-22&lt;/P&gt;&lt;P&gt;Sep-2022 :&amp;nbsp; 04 Sep-21 to 01 Oct-21&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My Current Year Data is coming correct as per this dates when I Select 2025 Fiscal Year Slicer Selection Sep-2025 :&amp;nbsp; 31 Aug-24 to 27 Sep-24.&lt;/P&gt;&lt;P&gt;I want Previous Year data while I select 2025 Fiscal Year Slicer my Previous Year Line will be&amp;nbsp;Sep-2024 :&amp;nbsp; 02 Sep-23 to 29 Sep-23 this period, I tried with SameperiodLastYear, Dateadd, DatesInPeriod, DatesBetween all are getting wrong please help me here to resolve the mentioned issue. Any more clarification please ping me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks In Advance.&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>Mon, 17 Mar 2025 08:34:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Fiscal-Year-Data-by-Our-own-Calendar-that-may-differs/m-p/4612401#M176530</guid>
      <dc:creator>DharaniPrathap</dc:creator>
      <dc:date>2025-03-17T08:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Fiscal Year Data by Our own Calendar that may differs every Year on Year and Month on Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Fiscal-Year-Data-by-Our-own-Calendar-that-may-differs/m-p/4612477#M176532</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="763724" data-lia-user-login="DharaniPrathap" class="lia-mention lia-mention-user"&gt;DharaniPrathap&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can create a custom date table in Power BI using DAX. Here is an example:&lt;/P&gt;
&lt;P&gt;CustomDateTable = &lt;BR /&gt;ADDCOLUMNS (&lt;BR /&gt;CALENDAR (DATE(2021, 8, 31), DATE(2025, 9, 27)),&lt;BR /&gt;"FiscalYear", &lt;BR /&gt;SWITCH (&lt;BR /&gt;TRUE(),&lt;BR /&gt;[Date] &amp;gt;= DATE(2024, 8, 31) &amp;amp;&amp;amp; [Date] &amp;lt;= DATE(2024, 9, 27), "2025",&lt;BR /&gt;[Date] &amp;gt;= DATE(2023, 9, 2) &amp;amp;&amp;amp; [Date] &amp;lt;= DATE(2023, 9, 29), "2024",&lt;BR /&gt;[Date] &amp;gt;= DATE(2022, 9, 3) &amp;amp;&amp;amp; [Date] &amp;lt;= DATE(2022, 9, 30), "2023",&lt;BR /&gt;[Date] &amp;gt;= DATE(2021, 9, 4) &amp;amp;&amp;amp; [Date] &amp;lt;= DATE(2021, 10, 1), "2022",&lt;BR /&gt;BLANK()&lt;BR /&gt;),&lt;BR /&gt;"FiscalMonth", &lt;BR /&gt;FORMAT([Date], "MMM")&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Ensure that your data model uses this custom date table for date-related calculations. You can link it to your fact table based on the date column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now, you can create a measure to calculate the previous fiscal year data.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PreviousFiscalYearData = &lt;BR /&gt;CALCULATE (&lt;BR /&gt;SUM ( 'YourFactTable'[YourMeasure] ),&lt;BR /&gt;FILTER (&lt;BR /&gt;ALL ( 'CustomDateTable' ),&lt;BR /&gt;'CustomDateTable'[FiscalYear] = &lt;BR /&gt;VALUE ( SELECTEDVALUE ( 'CustomDateTable'[FiscalYear] ) ) - 1&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 09:15:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Fiscal-Year-Data-by-Our-own-Calendar-that-may-differs/m-p/4612477#M176532</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-03-17T09:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Fiscal Year Data by Our own Calendar that may differs every Year on Year and Month on Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Fiscal-Year-Data-by-Our-own-Calendar-that-may-differs/m-p/4612632#M176538</link>
      <description>&lt;P&gt;Hello bhanu_gautam,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for your quick replay,&amp;nbsp;&lt;BR /&gt;need more clarity I need Dynamic last 36 months entire calender.&lt;BR /&gt;How do i do that for all last 36 month that is Mar'25 to Mar'22 and it's dynamically change the date for every month.&lt;BR /&gt;&lt;BR /&gt;Thanks In Advance&lt;/P&gt;</description>
      <pubDate>Mon, 17 Mar 2025 10:44:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Fiscal-Year-Data-by-Our-own-Calendar-that-may-differs/m-p/4612632#M176538</guid>
      <dc:creator>DharaniPrathap</dc:creator>
      <dc:date>2025-03-17T10:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Fiscal Year Data by Our own Calendar that may differs every Year on Year and Month on Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Fiscal-Year-Data-by-Our-own-Calendar-that-may-differs/m-p/4690378#M179623</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="763724" data-lia-user-login="DharaniPrathap" class="lia-mention lia-mention-user"&gt;DharaniPrathap&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;SPAN&gt;Welcome to the Microsoft Fabric Forum,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you &lt;SPAN&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="625922" data-lia-user-login="bhanu_gautam" class="lia-mention lia-mention-user"&gt;bhanu_gautam&lt;/a&gt;&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;for the contribution.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regarding the creation of a measure to handle Previous Year using Custom Fiscal Logic:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;1. Create a custom measure by mapping each fiscal period to its corresponding period in the previous fiscal year&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; using a lookup approach.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DAX

Measure_PreviousYear = 
VAR CurrentMonth = SELECTEDVALUE(FiscalCalendar[FiscalMonthYear])
VAR PrevMonth = 
    LOOKUPVALUE(
        MappingTable[PrevFiscalMonthYear],
        MappingTable[FiscalMonthYear], CurrentMonth
    )
RETURN
CALCULATE(
    SUM(FactTable[Amount]),
    FILTER(
        ALL(FiscalCalendar),
        FiscalCalendar[FiscalMonthYear] = PrevMonth
    )
)

&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.&amp;nbsp;To dynamically filter your visuals to just the last 36 fiscal months, add a &lt;SPAN&gt;Calculated Column&lt;/SPAN&gt; in your FiscalCalendar.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DAX

IsLast36Months = 
VAR MaxFiscalDate = CALCULATE(MAX(FiscalCalendar[FiscalStartDate]), ALL(FiscalCalendar))
VAR ThisMonthStart = FiscalCalendar[FiscalStartDate]
RETURN
DATEDIFF(ThisMonthStart, MaxFiscalDate, MONTH) &amp;lt;= 36
&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;3.&amp;nbsp;To limit charts to only show data from the last 36 custom fiscal months:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DAX

Measure_Last36Months =
CALCULATE(
    [YourMeasure],
    FILTER(
        FiscalCalendar,
        FiscalCalendar[IsLast36Months] = TRUE
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If&amp;nbsp;&lt;SPAN&gt;this information helps resolve your issue, kindly consider marking this response as the &lt;/SPAN&gt;&lt;STRONG&gt;Accepted Solution&lt;/STRONG&gt;&lt;SPAN&gt;, as it may assist other community members facing similar challenges.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for being part of the Microsoft Fabric Community.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Calibri; font-size: 11.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 13 May 2025 08:55:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Fiscal-Year-Data-by-Our-own-Calendar-that-may-differs/m-p/4690378#M179623</guid>
      <dc:creator>v-karpurapud</dc:creator>
      <dc:date>2025-05-13T08:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Fiscal Year Data by Our own Calendar that may differs every Year on Year and Month on Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Fiscal-Year-Data-by-Our-own-Calendar-that-may-differs/m-p/4696019#M179851</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="763724" data-lia-user-login="DharaniPrathap" class="lia-mention lia-mention-user"&gt;DharaniPrathap&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thank you.&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 12:40:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Fiscal-Year-Data-by-Our-own-Calendar-that-may-differs/m-p/4696019#M179851</guid>
      <dc:creator>v-karpurapud</dc:creator>
      <dc:date>2025-05-16T12:40:13Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Fiscal Year Data by Our own Calendar that may differs every Year on Year and Month on Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Fiscal-Year-Data-by-Our-own-Calendar-that-may-differs/m-p/4701646#M180088</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="763724" data-lia-user-login="DharaniPrathap" class="lia-mention lia-mention-user"&gt;DharaniPrathap&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN data-teams="true"&gt;I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 21 May 2025 12:05:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Fiscal-Year-Data-by-Our-own-Calendar-that-may-differs/m-p/4701646#M180088</guid>
      <dc:creator>v-karpurapud</dc:creator>
      <dc:date>2025-05-21T12:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Fiscal Year Data by Our own Calendar that may differs every Year on Year and Month on Month</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Fiscal-Year-Data-by-Our-own-Calendar-that-may-differs/m-p/4712293#M180468</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="763724" data-lia-user-login="DharaniPrathap" class="lia-mention lia-mention-user"&gt;DharaniPrathap&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN data-teams="true"&gt;I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please &lt;STRONG&gt;Accept it as a solution&lt;/STRONG&gt; and give it a '&lt;STRONG&gt;Kudos&lt;/STRONG&gt;' so others can find it easily.&lt;BR /&gt;&lt;BR /&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 May 2025 12:43:04 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Previous-Fiscal-Year-Data-by-Our-own-Calendar-that-may-differs/m-p/4712293#M180468</guid>
      <dc:creator>v-karpurapud</dc:creator>
      <dc:date>2025-05-29T12:43:04Z</dc:date>
    </item>
  </channel>
</rss>

