<?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: The Same week LY in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2581515#M74083</link>
    <description>&lt;P&gt;I never use the function like your function, so I tried yours, and it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my function :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;weekly Sales LY = 
var maxYear = max('Calendar'[Fiscal Year])
var maxWeekNumber = max('Calendar'[Fiscal_week_number])

return 
CALCULATE(
    [sales],
    filter(ALL('Calender'),
        'Calendar'[Fiscal Year] = maxYear - 1 &amp;amp;&amp;amp;
        'Calendar'[Fiscal_week_number] = maxWeekNumber 
    )
)&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 16 Jun 2022 00:27:37 GMT</pubDate>
    <dc:creator>vapid128</dc:creator>
    <dc:date>2022-06-16T00:27:37Z</dc:date>
    <item>
      <title>The Same week LY</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2581338#M74072</link>
      <description>&lt;P&gt;Hi guys,&lt;BR /&gt;Can someone help Modify this DAX query&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 20:46:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2581338#M74072</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-15T20:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: The Same week LY</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2581466#M74075</link>
      <description>&lt;P&gt;I tested your way, it should be work.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 23:16:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2581466#M74075</guid>
      <dc:creator>vapid128</dc:creator>
      <dc:date>2022-06-15T23:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: The Same week LY</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2581499#M74079</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="359999" data-lia-user-login="vapid128" class="lia-mention lia-mention-user"&gt;vapid128&lt;/a&gt;&amp;nbsp; Still not working for Weekly Sales LY. Do you have know another method?&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 00:02:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2581499#M74079</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-16T00:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: The Same week LY</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2581515#M74083</link>
      <description>&lt;P&gt;I never use the function like your function, so I tried yours, and it works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my function :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;weekly Sales LY = 
var maxYear = max('Calendar'[Fiscal Year])
var maxWeekNumber = max('Calendar'[Fiscal_week_number])

return 
CALCULATE(
    [sales],
    filter(ALL('Calender'),
        'Calendar'[Fiscal Year] = maxYear - 1 &amp;amp;&amp;amp;
        'Calendar'[Fiscal_week_number] = maxWeekNumber 
    )
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 16 Jun 2022 00:27:37 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2581515#M74083</guid>
      <dc:creator>vapid128</dc:creator>
      <dc:date>2022-06-16T00:27:37Z</dc:date>
    </item>
    <item>
      <title>Re: The Same week LY</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2581533#M74084</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="359999" data-lia-user-login="vapid128" class="lia-mention lia-mention-user"&gt;vapid128&lt;/a&gt;&amp;nbsp; Still return blank.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 00:45:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2581533#M74084</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-16T00:45:59Z</dc:date>
    </item>
    <item>
      <title>Re: The Same week LY</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2581553#M74086</link>
      <description>&lt;P&gt;show me your sales function and relationship between tables&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 01:04:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2581553#M74086</guid>
      <dc:creator>vapid128</dc:creator>
      <dc:date>2022-06-16T01:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: The Same week LY</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2581558#M74087</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="359999" data-lia-user-login="vapid128" class="lia-mention lia-mention-user"&gt;vapid128&lt;/a&gt;&amp;nbsp; My current works perfectly.&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Weekly Sales CY = &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;CALCULATE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;[sales]&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;FILTER&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;ALL&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar'&lt;/SPAN&gt;&lt;SPAN&gt;),&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;'Calendar'[Fiscal Year]&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar'[Fiscal Year]&lt;/SPAN&gt;&lt;SPAN&gt;) &amp;amp;&amp;amp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;VALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar'[Fiscal Week]&lt;/SPAN&gt;&lt;SPAN&gt;)= &lt;/SPAN&gt;&lt;SPAN&gt;Value&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;SELECTEDVALUE&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'Calendar'[Fiscal Week]&lt;/SPAN&gt;&lt;SPAN&gt;))))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 16 Jun 2022 01:09:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2581558#M74087</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-06-16T01:09:40Z</dc:date>
    </item>
    <item>
      <title>Re: The Same week LY</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2581560#M74088</link>
      <description>&lt;P&gt;I mean &lt;SPAN&gt;[sales]&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jun 2022 01:10:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2581560#M74088</guid>
      <dc:creator>vapid128</dc:creator>
      <dc:date>2022-06-16T01:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: The Same week LY</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2591324#M74657</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The result of SELECTEDVALUE('Calendar'[Fiscal Year]) is blank due to you only have one field in this table, so the countrows( values(&amp;nbsp;'Calendar'[Fiscal Year]) &amp;gt;1 of each rows when you do not do some filter outside the table visual.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Or the selectedvalue(&amp;nbsp;'Calendar'[Fiscal week number]) is blank.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If im wrong, please let me know and share your pbix file without sensitive data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ chenwu zhu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/EM&gt;&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>Tue, 21 Jun 2022 07:02:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/The-Same-week-LY/m-p/2591324#M74657</guid>
      <dc:creator>v-chenwuz-msft</dc:creator>
      <dc:date>2022-06-21T07:02:49Z</dc:date>
    </item>
  </channel>
</rss>

