<?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: I want to fetch data for last week and last month (week wise and month wise data) in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4347740#M172676</link>
    <description>&lt;P&gt;for some reason i am getting the overall count rather than getting the count which was caused by change, also i might need the query to get the data for current month which from calendar 1st to 31st&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jan 2025 13:19:59 GMT</pubDate>
    <dc:creator>Faeez</dc:creator>
    <dc:date>2025-01-01T13:19:59Z</dc:date>
    <item>
      <title>I want to fetch data for last week and last month (week wise and month wise data)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4335455#M172143</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to get the data week wise and month wise i already tried slicer and got it but i want to display data only for past week and past month without slicer and using DAX query.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;U&gt;&lt;STRONG&gt;To achieve&amp;nbsp;&lt;/STRONG&gt;&lt;/U&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;DAX query to get data for last week.&lt;/LI&gt;&lt;LI&gt;DAX query to get data for last month.&lt;/LI&gt;&lt;LI&gt;DAX to get P1 reported due to change&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;INC Number&lt;/TD&gt;&lt;TD&gt;Priority&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;Created&lt;/TD&gt;&lt;TD&gt;Workgroup&lt;/TD&gt;&lt;TD&gt;Description&lt;/TD&gt;&lt;TD&gt;Change&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;INC20001&lt;/TD&gt;&lt;TD&gt;1-Critical&lt;/TD&gt;&lt;TD&gt;15-12-2024&lt;/TD&gt;&lt;TD&gt;Network L2&lt;/TD&gt;&lt;TD&gt;Network issue&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;INC20002&lt;/TD&gt;&lt;TD&gt;1-Critical&lt;/TD&gt;&lt;TD&gt;14-12-2024&lt;/TD&gt;&lt;TD&gt;DB L2&lt;/TD&gt;&lt;TD&gt;DB issue&lt;/TD&gt;&lt;TD&gt;CHN-1234&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;INC20003&lt;/TD&gt;&lt;TD&gt;1-Critical&lt;/TD&gt;&lt;TD&gt;13-12-2024&lt;/TD&gt;&lt;TD&gt;Network L2&lt;/TD&gt;&lt;TD&gt;Network issue&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;INC20004&lt;/TD&gt;&lt;TD&gt;1-Critical&lt;/TD&gt;&lt;TD&gt;15-12-2024&lt;/TD&gt;&lt;TD&gt;DB L2&lt;/TD&gt;&lt;TD&gt;DB issue&lt;/TD&gt;&lt;TD&gt;CHN-1234&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;INC20005&lt;/TD&gt;&lt;TD&gt;1-Critical&lt;/TD&gt;&lt;TD&gt;14-12-2024&lt;/TD&gt;&lt;TD&gt;Network L2&lt;/TD&gt;&lt;TD&gt;Network issue&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;INC20006&lt;/TD&gt;&lt;TD&gt;1-Critical&lt;/TD&gt;&lt;TD&gt;8/12/2024&lt;/TD&gt;&lt;TD&gt;DB L2&lt;/TD&gt;&lt;TD&gt;DB issue&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;INC20007&lt;/TD&gt;&lt;TD&gt;1-Critical&lt;/TD&gt;&lt;TD&gt;7/12/2024&lt;/TD&gt;&lt;TD&gt;Network L2&lt;/TD&gt;&lt;TD&gt;Network issue&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;INC20008&lt;/TD&gt;&lt;TD&gt;1-Critical&lt;/TD&gt;&lt;TD&gt;6/12/2024&lt;/TD&gt;&lt;TD&gt;DB L2&lt;/TD&gt;&lt;TD&gt;DB issue&lt;/TD&gt;&lt;TD&gt;CHN-1234&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 17:03:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4335455#M172143</guid>
      <dc:creator>Faeez</dc:creator>
      <dc:date>2024-12-18T17:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: I want to fetch data for last week and last month (week wise and month wise data)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4335589#M172149</link>
      <description>&lt;P&gt;You will have to define what you mean by "last"&amp;nbsp; and "week".&amp;nbsp; What day does your week start?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Consider using DATEADD(xxx,-7, DAY)&amp;nbsp; for the week and DATEADD(xxx,-1,MONTH) for the month.&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2024 19:28:00 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4335589#M172149</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-12-18T19:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: I want to fetch data for last week and last month (week wise and month wise data)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4335862#M172170</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="899305" data-lia-user-login="Faeez" class="lia-mention lia-mention-user"&gt;Faeez&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I think you can use New table. on top of that you can apply CALCULATETABLE function.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I create a table as you mentioned.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Then I create three new tables and here are their DAX codes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;LastWeekData = 
CALCULATETABLE(
    'Table',
    'Table'[Created] &amp;gt;= TODAY() - WEEKDAY(TODAY(), 2) - 6 &amp;amp;&amp;amp;
    'Table'[Created] &amp;lt; TODAY() - WEEKDAY(TODAY(), 2) + 1
)&lt;/LI-CODE&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;LI-CODE lang="markup"&gt;LastMonthData = 
CALCULATETABLE(
    'Table',
    'Table'[Created] &amp;gt;= EOMONTH(TODAY(), -1) + 1,
    'Table'[Created] &amp;lt;= EOMONTH(TODAY(), 0)
)&lt;/LI-CODE&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;LI-CODE lang="markup"&gt;P1Change = 
CALCULATETABLE(
    'Table',
    'Table'[Priority ] = "1-Critical",
    NOT(ISBLANK('Table'[Change ]))
)&lt;/LI-CODE&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;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Best Regards&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;Yilong Zhou&lt;/SPAN&gt;&lt;/P&gt;
&lt;P style="margin-bottom: 6.0pt;"&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&amp;nbsp;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 01:49:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4335862#M172170</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-12-19T01:49:44Z</dc:date>
    </item>
    <item>
      <title>Re: I want to fetch data for last week and last month (week wise and month wise data)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4336792#M172201</link>
      <description>&lt;P&gt;count of incident no reported this month ( specific month) - 1 to 31st&lt;BR /&gt;week - Monday to Sunday&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 10:57:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4336792#M172201</guid>
      <dc:creator>Faeez</dc:creator>
      <dc:date>2024-12-19T10:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: I want to fetch data for last week and last month (week wise and month wise data)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4338796#M172291</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="899305" data-lia-user-login="Faeez" class="lia-mention lia-mention-user"&gt;Faeez&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;LastWeekData = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;COUNTROWS('Table'),&lt;BR /&gt;'Table'[Created] &amp;gt;= TODAY() - WEEKDAY(TODAY(), 2) - 7 &amp;amp;&amp;amp;&lt;BR /&gt;'Table'[Created] &amp;lt; TODAY() - WEEKDAY(TODAY(), 2)&lt;BR /&gt;)&lt;/PRE&gt;&lt;PRE&gt;LastMonthData = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;COUNTROWS('Table'),&lt;BR /&gt;'Table'[Created] &amp;gt;= EOMONTH(TODAY(), -2) + 1 &amp;amp;&amp;amp;&lt;BR /&gt;'Table'[Created] &amp;lt;= EOMONTH(TODAY(), -1)&lt;BR /&gt;)&lt;/PRE&gt;&lt;PRE&gt;P1DueToChange = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;COUNTROWS('Table'),&lt;BR /&gt;'Table'[Priority] = "1-Critical" &amp;amp;&amp;amp;&lt;BR /&gt;NOT(ISBLANK('Table'[Change]))&lt;BR /&gt;)&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":love_letter:"&gt;💌&lt;/span&gt; &lt;STRONG&gt;If this helped, a Kudos &lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt; or Solution mark &lt;span class="lia-unicode-emoji" title=":white_heavy_check_mark:"&gt;✅&lt;/span&gt; would be great! &lt;span class="lia-unicode-emoji" title=":party_popper:"&gt;🎉&lt;/span&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Cheers,&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Kedar&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;A href="https://www.linkedin.com/in/kedar-pande" target="_blank" rel="noopener"&gt;Connect on LinkedIn&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2024 14:02:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4338796#M172291</guid>
      <dc:creator>Kedar_Pande</dc:creator>
      <dc:date>2024-12-20T14:02:54Z</dc:date>
    </item>
    <item>
      <title>Re: I want to fetch data for last week and last month (week wise and month wise data)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4340811#M172373</link>
      <description>&lt;P&gt;&lt;img /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;For getting data P1 due to change&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;the tickets inside the table are by default P1 issues so i want to get a count of P1 which are caused due to change. if you the see the table out of 4 issues there are 2 tickets which are caused due to P1. Hence the output i should is 2 but the DAX which you gave is not filtering the count rather giving the overall count.&lt;BR /&gt;could you help?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2024 12:16:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4340811#M172373</guid>
      <dc:creator>Faeez</dc:creator>
      <dc:date>2024-12-23T12:16:10Z</dc:date>
    </item>
    <item>
      <title>Re: I want to fetch data for last week and last month (week wise and month wise data)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4340869#M172376</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="899305" data-lia-user-login="Faeez" class="lia-mention lia-mention-user"&gt;Faeez&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can try:&lt;/P&gt;&lt;PRE&gt;P1DueToChange = &lt;BR /&gt;CALCULATE(&lt;BR /&gt;COUNTROWS('Table'),&lt;BR /&gt;'Table'[Priority] = "1-Critical",&lt;BR /&gt;NOT(ISBLANK('Table'[Change])) &lt;BR /&gt;)&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Dec 2024 13:53:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4340869#M172376</guid>
      <dc:creator>Kedar_Pande</dc:creator>
      <dc:date>2024-12-23T13:53:21Z</dc:date>
    </item>
    <item>
      <title>Re: I want to fetch data for last week and last month (week wise and month wise data)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4347740#M172676</link>
      <description>&lt;P&gt;for some reason i am getting the overall count rather than getting the count which was caused by change, also i might need the query to get the data for current month which from calendar 1st to 31st&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jan 2025 13:19:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4347740#M172676</guid>
      <dc:creator>Faeez</dc:creator>
      <dc:date>2025-01-01T13:19:59Z</dc:date>
    </item>
    <item>
      <title>Re: I want to fetch data for last week and last month (week wise and month wise data)</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4348691#M172723</link>
      <description>&lt;P&gt;&lt;SPAN&gt;count of incident no reported this month ( specific month) - 1 to 31st&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;week - Monday to Sunday&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;could you help me with this one?&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 16:40:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/I-want-to-fetch-data-for-last-week-and-last-month-week-wise-and/m-p/4348691#M172723</guid>
      <dc:creator>Faeez</dc:creator>
      <dc:date>2025-01-02T16:40:46Z</dc:date>
    </item>
  </channel>
</rss>

