<?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 Dax formula to get week data in Service</title>
    <link>https://community.fabric.microsoft.com/t5/Service/Dax-formula-to-get-week-data/m-p/3635790#M217543</link>
    <description>&lt;P&gt;I have a scenario where i have 2 months data i.e., 2023 december 5 weeks and 2024 january 2 weeks(till today)&amp;nbsp;&lt;BR /&gt;so i need to show the data in a bar chart as&amp;nbsp; jan1st week with december 1st week, jan 2nd week with december 2nd week and so on jan dont have next weeks data but december should show the data.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;is there any way to achieve it ?&lt;/P&gt;</description>
    <pubDate>Fri, 12 Jan 2024 12:08:33 GMT</pubDate>
    <dc:creator>Chandu_sandy</dc:creator>
    <dc:date>2024-01-12T12:08:33Z</dc:date>
    <item>
      <title>Dax formula to get week data</title>
      <link>https://community.fabric.microsoft.com/t5/Service/Dax-formula-to-get-week-data/m-p/3635790#M217543</link>
      <description>&lt;P&gt;I have a scenario where i have 2 months data i.e., 2023 december 5 weeks and 2024 january 2 weeks(till today)&amp;nbsp;&lt;BR /&gt;so i need to show the data in a bar chart as&amp;nbsp; jan1st week with december 1st week, jan 2nd week with december 2nd week and so on jan dont have next weeks data but december should show the data.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;is there any way to achieve it ?&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 12:08:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Service/Dax-formula-to-get-week-data/m-p/3635790#M217543</guid>
      <dc:creator>Chandu_sandy</dc:creator>
      <dc:date>2024-01-12T12:08:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dax formula to get week data</title>
      <link>https://community.fabric.microsoft.com/t5/Service/Dax-formula-to-get-week-data/m-p/3635909#M217547</link>
      <description>&lt;P&gt;You can create a 'WeekOfMonth' column on your Date Dimension that assigns the WeekOfMonth number by the Week Ending date.&amp;nbsp; Then you can write DAX variables to leverage the WeekOfMonth Number to get your comps in your DAX measure(s)&lt;/P&gt;</description>
      <pubDate>Fri, 12 Jan 2024 13:14:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Service/Dax-formula-to-get-week-data/m-p/3635909#M217547</guid>
      <dc:creator>hvnter</dc:creator>
      <dc:date>2024-01-12T13:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Dax formula to get week data</title>
      <link>https://community.fabric.microsoft.com/t5/Service/Dax-formula-to-get-week-data/m-p/3638186#M217671</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="669656" data-lia-user-login="Chandu_sandy" class="lia-mention lia-mention-user"&gt;Chandu_sandy&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some simple data to help you solve the problem, you can follow these steps below:&lt;/P&gt;
&lt;P&gt;1.Create a new table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Table =
VAR _table =
    ADDCOLUMNS (
        CALENDAR ( DATE ( 2023, 12, 1 ), TODAY () ),
        "Week", WEEKNUM ( [Date] ),
        "Month", MONTH ( [Date] )
    )
RETURN
    _table
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2.Create a new column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;MonthWeek =
VAR _1 =
    WEEKNUM ( [Date] ) - WEEKNUM ( DATE ( 2023, 12, 1 ) ) + 1
RETURN
    IF ( 'Table'[Week] &amp;gt; 6, _1, 'Table'[Week] )
&lt;/LI-CODE&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;
&lt;LI-CODE lang="markup"&gt;total =
CALCULATE (
    SUM ( 'Table'[SalesAmount] ),
    FILTER (
        ALL ( 'Table' ),
        'Table'[Month] = EARLIER ( 'Table'[Month] )
            &amp;amp;&amp;amp; 'Table'[MonthWeek] = EARLIER ( 'Table'[MonthWeek] )
    )
)
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Final output:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&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;&lt;A href="https://community.fabric.microsoft.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490" target="_blank"&gt;How to Get Your Question Answered Quickly - Microsoft Fabric Community&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;If it does not help, please provide more details with your desired out put and pbix file without privacy information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;Best Regards,&lt;/SUP&gt;&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;Yifan Wang&lt;/SUP&gt;&lt;/P&gt;
&lt;P&gt;&lt;SUP&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;helps&lt;/EM&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept it as the solution&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SUP&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Jan 2024 05:59:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Service/Dax-formula-to-get-week-data/m-p/3638186#M217671</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-15T05:59:30Z</dc:date>
    </item>
  </channel>
</rss>

