<?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: Week Number parameters in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Week-Number-parameters/m-p/2685637#M80634</link>
    <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp; for your reponse.&lt;/P&gt;&lt;P&gt;just one detail ,how I can convert "Slicer Month" to a &lt;STRONG&gt;Date&lt;/STRONG&gt; Format, now it is a &lt;STRONG&gt;Text ?&lt;/STRONG&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 07 Aug 2022 16:03:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2022-08-07T16:03:26Z</dc:date>
    <item>
      <title>Week Number parameters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Week-Number-parameters/m-p/2685608#M80628</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm working on a weekly production plan, I created a date table with the week numbers (Formula: Weeknum)&lt;BR /&gt;My working week starts on Sunday and ends on Saturday.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are weeks that are situated in 2 months&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;U&gt;&lt;STRONG&gt;Example 01:&lt;/STRONG&gt;&lt;/U&gt; Week 32 , start in Sunday 31/07/2022 ,ends 06/08/2022&amp;nbsp; , &lt;STRONG&gt;1 day in July and&amp;nbsp; 6 days in August&lt;/STRONG&gt;&amp;nbsp; . In this case&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Dax&amp;nbsp;considered this week in July --it's not correct for me&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to apply this parameter when retrieving the week number in case the week is situated in 2 different months.&lt;/P&gt;&lt;P&gt;- (&lt;STRONG&gt;Case Example 01)&lt;/STRONG&gt;&amp;nbsp;The Week 32 will be conidered in July if the number of days of this week are =&amp;gt;3 are in July , else considere in August.&lt;/P&gt;&lt;P&gt;How I can do this ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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>Sun, 07 Aug 2022 14:44:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Week-Number-parameters/m-p/2685608#M80628</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-07T14:44:08Z</dc:date>
    </item>
    <item>
      <title>Re: Week Number parameters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Week-Number-parameters/m-p/2685622#M80632</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Here is a sample file with the solution&amp;nbsp;&lt;A href="https://www.dropbox.com/t/SfZdZRuR9IMEblZN" target="_blank"&gt;https://www.dropbox.com/t/SfZdZRuR9IMEblZN&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You need to create a new month column in the date table to use as slicer, as follows:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Slicer Month = 
VAR CurrentMonth = 'Date'[Month Number]
VAR CurrentYearWeekTable =
    FILTER (
        CALCULATETABLE ( 'Date', ALLEXCEPT ( 'Date', 'Date'[Year], 'Date'[Week Number] ) ),
        'Date'[Month Number] = CurrentMonth
    )
VAR MaxWeekday = 
    MAXX ( CurrentYearWeekTable, WEEKDAY ( 'Date'[Date], 1 ) )
VAR MonthNumber =
    IF (
        MaxWeekday &amp;lt; 3, 
        CurrentMonth + 1,
        CurrentMonth
    )
RETURN
    FORMAT ( DATE ( 1, MonthNumber, 1 ), "MMMM" )&lt;/LI-CODE&gt;</description>
      <pubDate>Sun, 07 Aug 2022 15:19:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Week-Number-parameters/m-p/2685622#M80632</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-08-07T15:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: Week Number parameters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Week-Number-parameters/m-p/2685637#M80634</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp; for your reponse.&lt;/P&gt;&lt;P&gt;just one detail ,how I can convert "Slicer Month" to a &lt;STRONG&gt;Date&lt;/STRONG&gt; Format, now it is a &lt;STRONG&gt;Text ?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Aug 2022 16:03:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Week-Number-parameters/m-p/2685637#M80634</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-07T16:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Week Number parameters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Week-Number-parameters/m-p/2685662#M80640</link>
      <description>&lt;P&gt;Anonymous&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you mean you want to show the first or last day of the month?&lt;/P&gt;</description>
      <pubDate>Sun, 07 Aug 2022 17:34:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Week-Number-parameters/m-p/2685662#M80640</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-08-07T17:34:17Z</dc:date>
    </item>
    <item>
      <title>Re: Week Number parameters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Week-Number-parameters/m-p/2685687#M80648</link>
      <description>&lt;PRE&gt;&lt;SPAN class=""&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;,I mean to put slicer in descending order in the visual (report) like: January, February, March.....SO I must put the format as a dat&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 07 Aug 2022 18:18:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Week-Number-parameters/m-p/2685687#M80648</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-08-07T18:18:40Z</dc:date>
    </item>
    <item>
      <title>Re: Week Number parameters</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Week-Number-parameters/m-p/2686168#M80687</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Create another column (Slicer Month Number) and then use the option sort by column to sort the Slicer Month by the Slicer Month Number&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Slicer Month = 
VAR CurrentMonth = 'Date'[Month Number]
VAR CurrentYearWeekTable =
    FILTER (
        CALCULATETABLE ( 'Date', ALLEXCEPT ( 'Date', 'Date'[Year], 'Date'[Week Number] ) ),
        'Date'[Month Number] = CurrentMonth
    )
VAR MaxWeekday = 
    MAXX ( CurrentYearWeekTable, WEEKDAY ( 'Date'[Date], 1 ) )
VAR MonthNumber =
    IF (
        MaxWeekday &amp;lt; 3, 
        CurrentMonth + 1,
        CurrentMonth
    )
RETURN
    MonthNumber&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 08 Aug 2022 05:04:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Week-Number-parameters/m-p/2686168#M80687</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-08-08T05:04:35Z</dc:date>
    </item>
  </channel>
</rss>

