<?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: Calculate previous years data without date, data aggregeted to weeks in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-previous-years-data-without-date-data-aggregeted-to/m-p/4697686#M179927</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1243291" data-lia-user-login="Viktor_" class="lia-mention lia-mention-user"&gt;Viktor_&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;Has your issue been resolved, or do you require any further information? Your feedback is valuable to us. If the solution was effective, please mark it as '&lt;STRONG&gt;Accepted Solution' &lt;/STRONG&gt;to assist other community members experiencing the same issue.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 19 May 2025 05:20:00 GMT</pubDate>
    <dc:creator>V-yubandi-msft</dc:creator>
    <dc:date>2025-05-19T05:20:00Z</dc:date>
    <item>
      <title>Calculate previous years data without date, data aggregeted to weeks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-previous-years-data-without-date-data-aggregeted-to/m-p/4619899#M176811</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to ask some help.&lt;/P&gt;&lt;P&gt;I have an aggregated table to weeks with ordered quantity. I would like to calculate the previous years orders&lt;BR /&gt;on the same week by the Partner-Product_ID-WEEK level.&lt;BR /&gt;I have tried a lot of calculation, but neither works. Tried to get to clear the filter on weeks and after would like to get the WEEK_LY column value in the related row and then filter back the weeks.&lt;BR /&gt;The main aim is a measure but also calculated column is fine.&lt;BR /&gt;Also have to work correctly on totals in a matrix on all level.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Hope clearly define the problem and there is a solution.&lt;/P&gt;&lt;P&gt;Thank you in advance!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Partner&lt;/TD&gt;&lt;TD&gt;product_ID&lt;/TD&gt;&lt;TD&gt;Period&lt;/TD&gt;&lt;TD&gt;WEEK&lt;/TD&gt;&lt;TD&gt;WEEK_LY&lt;/TD&gt;&lt;TD&gt;Quantity_ordered&lt;/TD&gt;&lt;TD&gt;Quantity_ordered_LY&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Partner 1&lt;/TD&gt;&lt;TD&gt;product 1&lt;/TD&gt;&lt;TD&gt;23P11&lt;/TD&gt;&lt;TD&gt;23W48&lt;/TD&gt;&lt;TD&gt;22W48&lt;/TD&gt;&lt;TD&gt;54&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Partner 2&lt;/TD&gt;&lt;TD&gt;product 1&lt;/TD&gt;&lt;TD&gt;22P10&lt;/TD&gt;&lt;TD&gt;22W41&lt;/TD&gt;&lt;TD&gt;21W41&lt;/TD&gt;&lt;TD&gt;18&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Partner 2&lt;/TD&gt;&lt;TD&gt;product 1&lt;/TD&gt;&lt;TD&gt;22P12&lt;/TD&gt;&lt;TD&gt;22W51&lt;/TD&gt;&lt;TD&gt;21W51&lt;/TD&gt;&lt;TD&gt;144&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Partner 3&lt;/TD&gt;&lt;TD&gt;product 1&lt;/TD&gt;&lt;TD&gt;24P07&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D&gt;24P02&lt;/TD&gt;&lt;TD&gt;24W09&lt;/TD&gt;&lt;TD&gt;23W09&lt;/TD&gt;&lt;TD&gt;72&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Partner 5&lt;/TD&gt;&lt;TD&gt;product 1&lt;/TD&gt;&lt;TD&gt;24P03&lt;/TD&gt;&lt;TD&gt;24W13&lt;/TD&gt;&lt;TD&gt;23W13&lt;/TD&gt;&lt;TD&gt;54&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Fri, 21 Mar 2025 13:04:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-previous-years-data-without-date-data-aggregeted-to/m-p/4619899#M176811</guid>
      <dc:creator>Viktor_</dc:creator>
      <dc:date>2025-03-21T13:04:07Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate previous years data without date, data aggregeted to weeks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-previous-years-data-without-date-data-aggregeted-to/m-p/4619934#M176813</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1243291" data-lia-user-login="Viktor_" class="lia-mention lia-mention-user"&gt;Viktor_&lt;/a&gt;&amp;nbsp;To ensure that the totals are calculated correctly in a matrix, you might need to use a slightly different approach. Here is an alternative measure that handles totals correctly:&lt;/P&gt;
&lt;P&gt;DAX&lt;BR /&gt;Quantity_ordered_LY = &lt;BR /&gt;SUMX(&lt;BR /&gt;'YourTable',&lt;BR /&gt;CALCULATE(&lt;BR /&gt;SUM('YourTable'[Quantity_ordered]),&lt;BR /&gt;FILTER(&lt;BR /&gt;'YourTable',&lt;BR /&gt;'YourTable'[Partner] = EARLIER('YourTable'[Partner]) &amp;amp;&amp;amp;&lt;BR /&gt;'YourTable'[product_ID] = EARLIER('YourTable'[product_ID]) &amp;amp;&amp;amp;&lt;BR /&gt;'YourTable'[WEEK] = EARLIER('YourTable'[WEEK_LY])&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Add the Quantity_ordered_LY measure to your matrix visualization in Power BI. This will show the previous year's orders for the same week at the Partner-Product_ID-WEEK level.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Mar 2025 13:27:15 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-previous-years-data-without-date-data-aggregeted-to/m-p/4619934#M176813</guid>
      <dc:creator>bhanu_gautam</dc:creator>
      <dc:date>2025-03-21T13:27:15Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate previous years data without date, data aggregeted to weeks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-previous-years-data-without-date-data-aggregeted-to/m-p/4620772#M176847</link>
      <description>&lt;P&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;Thank you for your quick answer!&lt;BR /&gt;I tried and I have only grand total, there is no values for others. And total is not correct.&lt;BR /&gt;What could be the error?&lt;BR /&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Sat, 22 Mar 2025 09:10:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-previous-years-data-without-date-data-aggregeted-to/m-p/4620772#M176847</guid>
      <dc:creator>Viktor_</dc:creator>
      <dc:date>2025-03-22T09:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate previous years data without date, data aggregeted to weeks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-previous-years-data-without-date-data-aggregeted-to/m-p/4682881#M179356</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1243291" data-lia-user-login="Viktor_" class="lia-mention lia-mention-user"&gt;Viktor_&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for sharing your result it helps pinpoint the issue.&lt;/P&gt;
&lt;P&gt;Your grand total shows, but row level values are missing because EARLIER() doesn't work well in measures like SUMX(), as it lacks row context.&lt;/P&gt;
&lt;P&gt;Use VAR and CALCULATE in your measure to properly maintain row context. This ensures correct calculations at both individual row and total levels in matrix visuals.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&amp;nbsp;&lt;SPAN data-teams="true"&gt; Did I answer your question? Mark my post as a &lt;STRONG&gt;solution.&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 May 2025 09:16:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-previous-years-data-without-date-data-aggregeted-to/m-p/4682881#M179356</guid>
      <dc:creator>V-yubandi-msft</dc:creator>
      <dc:date>2025-05-07T09:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate previous years data without date, data aggregeted to weeks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-previous-years-data-without-date-data-aggregeted-to/m-p/4688161#M179544</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1243291" data-lia-user-login="Viktor_" class="lia-mention lia-mention-user"&gt;Viktor_&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;May I ask if you have resolved this issue? If so, please mark the helpful reply and &lt;STRONG&gt;accept it as the solution.&lt;/STRONG&gt; 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>Mon, 12 May 2025 04:38:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-previous-years-data-without-date-data-aggregeted-to/m-p/4688161#M179544</guid>
      <dc:creator>V-yubandi-msft</dc:creator>
      <dc:date>2025-05-12T04:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate previous years data without date, data aggregeted to weeks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-previous-years-data-without-date-data-aggregeted-to/m-p/4693767#M179749</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1243291" data-lia-user-login="Viktor_" class="lia-mention lia-mention-user"&gt;Viktor_&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;Could you let us know if your issue has been resolved or if you are still experiencing difficulties? Your feedback is valuable to the community and can help others facing similar problems.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;Thank You.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 May 2025 09:07:09 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-previous-years-data-without-date-data-aggregeted-to/m-p/4693767#M179749</guid>
      <dc:creator>V-yubandi-msft</dc:creator>
      <dc:date>2025-05-15T09:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate previous years data without date, data aggregeted to weeks</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-previous-years-data-without-date-data-aggregeted-to/m-p/4697686#M179927</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="1243291" data-lia-user-login="Viktor_" class="lia-mention lia-mention-user"&gt;Viktor_&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&lt;SPAN data-teams="true"&gt;Has your issue been resolved, or do you require any further information? Your feedback is valuable to us. If the solution was effective, please mark it as '&lt;STRONG&gt;Accepted Solution' &lt;/STRONG&gt;to assist other community members experiencing the same issue.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 19 May 2025 05:20:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Calculate-previous-years-data-without-date-data-aggregeted-to/m-p/4697686#M179927</guid>
      <dc:creator>V-yubandi-msft</dc:creator>
      <dc:date>2025-05-19T05:20:00Z</dc:date>
    </item>
  </channel>
</rss>

