<?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: Current Year vs LY Comparison in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Year-vs-LY-Comparison/m-p/4825521#M184391</link>
    <description>&lt;P&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1352138" data-lia-user-login="afeef" class="lia-mention lia-mention-user"&gt;afeef&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope everything’s going great with you. Just checking in has the issue been resolved or are you still running into problems? Sharing an update can really help others facing the same thing.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 14 Sep 2025 15:54:55 GMT</pubDate>
    <dc:creator>v-ssriganesh</dc:creator>
    <dc:date>2025-09-14T15:54:55Z</dc:date>
    <item>
      <title>Current Year vs LY Comparison</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Year-vs-LY-Comparison/m-p/4822264#M184309</link>
      <description>&lt;P&gt;Hi Community,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So currently I'm trying to display current Sales vs LY Sales in a clustered column chart.&lt;/P&gt;&lt;P&gt;I have created a measure for LY:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;NetSales LY =&lt;/SPAN&gt; &lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;sum&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Current Sales'&lt;/SPAN&gt;&lt;SPAN&gt;[NetSales]&lt;/SPAN&gt;&lt;SPAN&gt;), &lt;/SPAN&gt;&lt;SPAN&gt;SAMEPERIODLASTYEAR&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar'&lt;/SPAN&gt;&lt;SPAN&gt;[SalesDate]&lt;/SPAN&gt;&lt;SPAN&gt;)).&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;Now the issue is that, when display the data in the graph, lets say for the period of 1/1/2025 to 9/9/2025, the currSales is taken till 9/9 but the LY data is shown till 30/9(end of the month).&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;img /&gt;&lt;img /&gt;&lt;P&gt;&lt;BR /&gt;Any ideas on how i can limit the LY data to follow the slicer values? (there is a date slicer with&amp;nbsp;&lt;SPAN&gt;'Calendar'&lt;/SPAN&gt;&lt;SPAN&gt;[SalesDate])&amp;nbsp;&lt;BR /&gt;LY expected value for September should be similar to TY value (+- 0.5M)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 10 Sep 2025 09:53:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Year-vs-LY-Comparison/m-p/4822264#M184309</guid>
      <dc:creator>afeef</dc:creator>
      <dc:date>2025-09-10T09:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year vs LY Comparison</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Year-vs-LY-Comparison/m-p/4822335#M184311</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1352138" data-lia-user-login="afeef" class="lia-mention lia-mention-user"&gt;afeef&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;To align LY with TY, you need to restrict LY to the same “last available date” in the current year. You can do this by comparing against MAX( 'Calendar'[SalesDate] ). For example:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;NetSales LY Aligned =
CALCULATE(
    SUM ( 'Current Sales'[NetSales] ),
    DATESBETWEEN(
        'Calendar'[SalesDate],
        DATEADD( MIN ( 'Calendar'[SalesDate] ), -1, YEAR ),
        DATEADD( MAX ( 'Calendar'[SalesDate] ), -1, YEAR )
    )
)&lt;/LI-CODE&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;This way, if your current year slicer is 1/1/2025 → 9/9/2025, then LY will only calculate for 1/1/2024 → 9/9/2024, not the full month of September.&lt;/SPAN&gt;&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;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Sep 2025 11:07:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Year-vs-LY-Comparison/m-p/4822335#M184311</guid>
      <dc:creator>rohit1991</dc:creator>
      <dc:date>2025-09-10T11:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year vs LY Comparison</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Year-vs-LY-Comparison/m-p/4822405#M184315</link>
      <description>&lt;P&gt;You could try&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;NetSales LY =
VAR _Dates =
    CALCULATETABLE (
        DATESYTD ( 'Calendar'[SalesDate] ),
        TREATAS ( { TODAY () }, 'Calendar'[SalesDate] )
    )
VAR Result =
    CALCULATE (
        SUM ( 'Current Sales'[NetSales] ),
        KEEPFILTERS ( SAMEPERIODLASTYEAR ( _Dates ) )
    )
RETURN
    Result
&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 10 Sep 2025 12:24:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Year-vs-LY-Comparison/m-p/4822405#M184315</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2025-09-10T12:24:50Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year vs LY Comparison</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Year-vs-LY-Comparison/m-p/4823588#M184337</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1352138" data-lia-user-login="afeef" class="lia-mention lia-mention-user"&gt;afeef&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thank you for posting your query in the Microsoft Fabric Community Forum, and thanks to&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240987" data-lia-user-login="johnt75" class="lia-mention lia-mention-user"&gt;johnt75&lt;/a&gt;&amp;nbsp;&amp;amp;&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="824538" data-lia-user-login="rohit1991" class="lia-mention lia-mention-user"&gt;rohit1991&lt;/a&gt;&amp;nbsp;for sharing valuable insights.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Could you please confirm if your query has been resolved by the provided solutions? This would be helpful for other members who may encounter similar issues.&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&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Sep 2025 12:13:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Year-vs-LY-Comparison/m-p/4823588#M184337</guid>
      <dc:creator>v-ssriganesh</dc:creator>
      <dc:date>2025-09-11T12:13:10Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year vs LY Comparison</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Year-vs-LY-Comparison/m-p/4825521#M184391</link>
      <description>&lt;P&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1352138" data-lia-user-login="afeef" class="lia-mention lia-mention-user"&gt;afeef&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope everything’s going great with you. Just checking in has the issue been resolved or are you still running into problems? Sharing an update can really help others facing the same thing.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;LI-WRAPPER&gt;&lt;/LI-WRAPPER&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 14 Sep 2025 15:54:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Year-vs-LY-Comparison/m-p/4825521#M184391</guid>
      <dc:creator>v-ssriganesh</dc:creator>
      <dc:date>2025-09-14T15:54:55Z</dc:date>
    </item>
    <item>
      <title>Re: Current Year vs LY Comparison</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Year-vs-LY-Comparison/m-p/4828438#M184462</link>
      <description>&lt;P&gt;Hello &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1352138" data-lia-user-login="afeef" class="lia-mention lia-mention-user"&gt;afeef&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;We hope you're doing well. Could you please confirm whether your issue has been resolved or if you're still facing challenges? Your update will be valuable to the community and may assist others with similar concerns.&lt;/SPAN&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>Wed, 17 Sep 2025 11:33:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Current-Year-vs-LY-Comparison/m-p/4828438#M184462</guid>
      <dc:creator>v-ssriganesh</dc:creator>
      <dc:date>2025-09-17T11:33:43Z</dc:date>
    </item>
  </channel>
</rss>

