<?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: DAX Measures WTD with DayNumber in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measures-WTD-with-DayNumber/m-p/3522002#M135290</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="178443" data-lia-user-login="DGTL" class="lia-mention lia-mention-user"&gt;DGTL&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can try the following methods&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Measure:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Value Y = CALCULATE(MAX('Table'[Value]),FILTER(ALL('Table'),[Week]=SELECTEDVALUE('Table'[Week])&amp;amp;&amp;amp;[NumDayWeek]=SELECTEDVALUE('Table'[NumDayWeek])&amp;amp;&amp;amp;[Year]=YEAR(TODAY())))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Value Y-1 = CALCULATE(MAX('Table'[Value]),FILTER(ALL('Table'),[Week]=SELECTEDVALUE('Table'[Week])&amp;amp;&amp;amp;[NumDayWeek]=SELECTEDVALUE('Table'[NumDayWeek])&amp;amp;&amp;amp;[Year]=YEAR(TODAY())-1))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is this the result you expect?&lt;/SPAN&gt;&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 _Charlotte&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;STRONG&gt;helps, then please consider&amp;nbsp;&lt;EM&gt;Accept it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 08 Nov 2023 09:31:51 GMT</pubDate>
    <dc:creator>v-zhangti</dc:creator>
    <dc:date>2023-11-08T09:31:51Z</dc:date>
    <item>
      <title>DAX Measures WTD with DayNumber</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measures-WTD-with-DayNumber/m-p/3514280#M134897</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;I am asking you about a DAX measurement.&lt;/P&gt;&lt;P&gt;Indeed, I would like to compare the Y-1 value for the same NumDayWeek from the previous year.&lt;/P&gt;&lt;P&gt;In order to make a WTD&lt;/P&gt;&lt;P&gt;I have a date table&lt;/P&gt;&lt;P&gt;Can you help me ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Nov 2023 10:46:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measures-WTD-with-DayNumber/m-p/3514280#M134897</guid>
      <dc:creator>DGTL</dc:creator>
      <dc:date>2023-11-03T10:46:17Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Measures WTD with DayNumber</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measures-WTD-with-DayNumber/m-p/3515480#M134953</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.&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;
&lt;LI-CODE lang="markup"&gt;Value Y: = 
SUM( Data[Value] )&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Value Y-1: =
VAR _lastyear =
    MAX ( Data[Year] ) - 1
VAR _samenumdayweek =
    MAX ( Data[NumDayWeek] )
RETURN
    CALCULATE (
        SUM ( Data[Value] ),
        Data[Year] = _lastyear
            &amp;amp;&amp;amp; Data[NumDayWeek] = _samenumdayweek
    )
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Nov 2023 03:54:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measures-WTD-with-DayNumber/m-p/3515480#M134953</guid>
      <dc:creator>Jihwan_Kim</dc:creator>
      <dc:date>2023-11-04T03:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Measures WTD with DayNumber</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measures-WTD-with-DayNumber/m-p/3518082#M135106</link>
      <description>&lt;P&gt;Good morning,&lt;/P&gt;&lt;P&gt;Thank you for your reply,&lt;/P&gt;&lt;P&gt;But I would have to compare day 5 of week 2 of the year 2022&lt;/P&gt;&lt;P&gt;with day 5 of week 2, of the year 2023&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Day 5 is not necessarily the same day. It's the fifth day of week 2.&lt;/P&gt;&lt;P&gt;You see ?&lt;/P&gt;&lt;P&gt;thanks again &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 15:53:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measures-WTD-with-DayNumber/m-p/3518082#M135106</guid>
      <dc:creator>DGTL</dc:creator>
      <dc:date>2023-11-06T15:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: DAX Measures WTD with DayNumber</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measures-WTD-with-DayNumber/m-p/3522002#M135290</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="178443" data-lia-user-login="DGTL" class="lia-mention lia-mention-user"&gt;DGTL&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;You can try the following methods&lt;/SPAN&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Measure:&lt;/SPAN&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Value Y = CALCULATE(MAX('Table'[Value]),FILTER(ALL('Table'),[Week]=SELECTEDVALUE('Table'[Week])&amp;amp;&amp;amp;[NumDayWeek]=SELECTEDVALUE('Table'[NumDayWeek])&amp;amp;&amp;amp;[Year]=YEAR(TODAY())))&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Value Y-1 = CALCULATE(MAX('Table'[Value]),FILTER(ALL('Table'),[Week]=SELECTEDVALUE('Table'[Week])&amp;amp;&amp;amp;[NumDayWeek]=SELECTEDVALUE('Table'[NumDayWeek])&amp;amp;&amp;amp;[Year]=YEAR(TODAY())-1))&lt;/LI-CODE&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is this the result you expect?&lt;/SPAN&gt;&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 _Charlotte&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;STRONG&gt;helps, then please consider&amp;nbsp;&lt;EM&gt;Accept it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Nov 2023 09:31:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DAX-Measures-WTD-with-DayNumber/m-p/3522002#M135290</guid>
      <dc:creator>v-zhangti</dc:creator>
      <dc:date>2023-11-08T09:31:51Z</dc:date>
    </item>
  </channel>
</rss>

