<?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: Determine the number of weeks based on teh months/quarter selected *Date tabel has only Month data( in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determine-the-number-of-weeks-based-on-teh-months-quarter/m-p/3939772#M153174</link>
    <description>&lt;P&gt;Thsis helps, But still doesnt provide week count which are complete..Hence I introduced WeekNo and then wrote DAX to calculate only complete weeks.&lt;/P&gt;</description>
    <pubDate>Wed, 22 May 2024 12:18:21 GMT</pubDate>
    <dc:creator>suma2413</dc:creator>
    <dc:date>2024-05-22T12:18:21Z</dc:date>
    <item>
      <title>Determine the number of weeks based on teh months/quarter selected *Date tabel has only Month data(</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determine-the-number-of-weeks-based-on-teh-months-quarter/m-p/3923094#M152668</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I have a date table which only has Month level data ( year, quarter, Month). Based on the filter, need to calculate the number of weeks.&lt;/P&gt;&lt;P&gt;Single year will be chosen so, can start the week count from start of year. User can choose month from different quarters also. Or can choose a full quarter. If current month is also chosen, only completed week should be considered-Basically upto previous week.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;Kindly help to calculate the number of weeks using DAX&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 08:44:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determine-the-number-of-weeks-based-on-teh-months-quarter/m-p/3923094#M152668</guid>
      <dc:creator>suma2413</dc:creator>
      <dc:date>2024-05-16T08:44:50Z</dc:date>
    </item>
    <item>
      <title>Re: Determine the number of weeks based on teh months/quarter selected *Date tabel has only Month data(</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determine-the-number-of-weeks-based-on-teh-months-quarter/m-p/3923191#M152674</link>
      <description>&lt;P&gt;I would suggest using a proper date table, this will make your life a whole lot easier.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are some great examples of extended date tables out there that can be created easily in Power Query.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a good article with some steps and a link to the code you can copy and paste.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://blog.enterprisedna.co/using-the-m-function-to-create-an-extended-power-bi-date-table/" target="_blank"&gt;https://blog.enterprisedna.co/using-the-m-function-to-create-an-extended-power-bi-date-table/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 16 May 2024 09:03:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determine-the-number-of-weeks-based-on-teh-months-quarter/m-p/3923191#M152674</guid>
      <dc:creator>mark_endicott</dc:creator>
      <dc:date>2024-05-16T09:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Determine the number of weeks based on teh months/quarter selected *Date tabel has only Month data(</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determine-the-number-of-weeks-based-on-teh-months-quarter/m-p/3926787#M152770</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="664753" data-lia-user-login="suma2413" class="lia-mention lia-mention-user"&gt;suma2413&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Here is my test data and Steps you can try:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Create measures:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;startDateOfMonth = STARTOFMONTH('Table'[Year-Month])&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;endDateOfMonth = EOMONTH([startDateOfMonth],0)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Sum = 
IF(
    HASONEFILTER('Table'[Year-Month]),
    DATEDIFF([startDateOfMonth],[endDateOfMonth],WEEK),
    SUMX('Table',DATEDIFF([startDateOfMonth],[endDateOfMonth],WEEK))
)&lt;/LI-CODE&gt;
&lt;P&gt;Final output&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Albert He&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;helps&lt;/STRONG&gt;&lt;/EM&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM&gt;&lt;STRONG&gt;Accept it as the solution&lt;/STRONG&gt;&lt;/EM&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 09:47:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determine-the-number-of-weeks-based-on-teh-months-quarter/m-p/3926787#M152770</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-05-17T09:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Determine the number of weeks based on teh months/quarter selected *Date tabel has only Month data(</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determine-the-number-of-weeks-based-on-teh-months-quarter/m-p/3939772#M153174</link>
      <description>&lt;P&gt;Thsis helps, But still doesnt provide week count which are complete..Hence I introduced WeekNo and then wrote DAX to calculate only complete weeks.&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 12:18:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Determine-the-number-of-weeks-based-on-teh-months-quarter/m-p/3939772#M153174</guid>
      <dc:creator>suma2413</dc:creator>
      <dc:date>2024-05-22T12:18:21Z</dc:date>
    </item>
  </channel>
</rss>

