<?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 How to add week to hierarchy in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-add-week-to-hierarchy/m-p/2147717#M49448</link>
    <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm quite new with DAX and struggling to find a guide on how to add week to the date hieararchy. Can someone shed some light? Thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 21 Oct 2021 09:00:36 GMT</pubDate>
    <dc:creator>Supipa</dc:creator>
    <dc:date>2021-10-21T09:00:36Z</dc:date>
    <item>
      <title>How to add week to hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-add-week-to-hierarchy/m-p/2147717#M49448</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm quite new with DAX and struggling to find a guide on how to add week to the date hieararchy. Can someone shed some light? Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 09:00:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-add-week-to-hierarchy/m-p/2147717#M49448</guid>
      <dc:creator>Supipa</dc:creator>
      <dc:date>2021-10-21T09:00:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to add week to hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-add-week-to-hierarchy/m-p/2148742#M49479</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="321998" data-lia-user-login="Supipa" class="lia-mention lia-mention-user"&gt;Supipa&lt;/a&gt; , You need to create a custom hierarchy. Create a date table with week columns and then create custom hierarchy &lt;/P&gt;
&lt;P&gt;Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1&lt;BR /&gt;Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)&lt;BR /&gt;Week Number = WEEKNUM([Date],2)&lt;BR /&gt;Week = if('Date'[Week Number]&amp;lt;10,'Date'[Year]*10 &amp;amp; 'Date'[Week Number],'Date'[Year]&amp;amp;'Date'[Week Number])Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],2)+1&lt;BR /&gt;Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],2)&lt;BR /&gt;Week Number = WEEKNUM([Date],2)&lt;BR /&gt;Week = if('Date'[Week Number]&amp;lt;10,'Date'[Year]*10 &amp;amp; 'Date'[Week Number],'Date'[Year]&amp;amp;'Date'[Week Number])&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Custom Hierarchy &lt;BR /&gt;&lt;A href="https://stoneridgesoftware.com/creating-hierarchies-in-power-bi/" target="_blank"&gt;https://stoneridgesoftware.com/creating-hierarchies-in-power-bi/&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.youtube.com/watch?v=x6vXVJZ_eTY" target="_blank"&gt;https://www.youtube.com/watch?v=x6vXVJZ_eTY&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 16:59:38 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-add-week-to-hierarchy/m-p/2148742#M49479</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-10-21T16:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to add week to hierarchy</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-add-week-to-hierarchy/m-p/2149831#M49512</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="148838" data-lia-user-login="amitchandak" class="lia-mention lia-mention-user"&gt;amitchandak&lt;/a&gt;&amp;nbsp;, Thank you very much!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've ended up creating a calendar table by using&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;CALENDAR(DATE(YEAR(MIN(Transaction_facttbl[Date])),1,1),DATE(YEAR(MAX(Transaction_facttbl[Date])),12,31))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;and then just adding a column for weeknum, but will try what you suggested too.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you very much.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Oct 2021 07:34:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-add-week-to-hierarchy/m-p/2149831#M49512</guid>
      <dc:creator>Supipa</dc:creator>
      <dc:date>2021-10-22T07:34:07Z</dc:date>
    </item>
  </channel>
</rss>

