<?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 Count of rows based on start date and end date column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3461578#M132042</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a table like below&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I need to count the number of app ids which fall in each month (e.g. how many app ids are there in oct 2023, how many in nov 2023 and so on).&amp;nbsp;&lt;/P&gt;&lt;P&gt;After that I need to display it on a stacked bar chart with functional group as legend. months as x axis and count of app ids as y axis.&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 05 Oct 2023 12:14:48 GMT</pubDate>
    <dc:creator>Vaibhav3008</dc:creator>
    <dc:date>2023-10-05T12:14:48Z</dc:date>
    <item>
      <title>Count of rows based on start date and end date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3461578#M132042</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have a table like below&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;I need to count the number of app ids which fall in each month (e.g. how many app ids are there in oct 2023, how many in nov 2023 and so on).&amp;nbsp;&lt;/P&gt;&lt;P&gt;After that I need to display it on a stacked bar chart with functional group as legend. months as x axis and count of app ids as y axis.&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 12:14:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3461578#M132042</guid>
      <dc:creator>Vaibhav3008</dc:creator>
      <dc:date>2023-10-05T12:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: Count of rows based on start date and end date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3462228#M132067</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="537446" data-lia-user-login="Vaibhav3008" class="lia-mention lia-mention-user"&gt;Vaibhav3008&lt;/a&gt;&amp;nbsp;Hi!&lt;BR /&gt;&lt;BR /&gt;Can you paste the data?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BBF&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 17:36:50 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3462228#M132067</guid>
      <dc:creator>BeaBF</dc:creator>
      <dc:date>2023-10-05T17:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: Count of rows based on start date and end date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3462248#M132069</link>
      <description>&lt;P&gt;Thanks for the reply. Here it is:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Functional Group&lt;/TD&gt;&lt;TD&gt;App Id&lt;/TD&gt;&lt;TD&gt;Start Date&lt;/TD&gt;&lt;TD&gt;End Date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;FG01&lt;/TD&gt;&lt;TD&gt;App01&lt;/TD&gt;&lt;TD&gt;19-06-2023&lt;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;TR&gt;&lt;TD&gt;FG01&lt;/TD&gt;&lt;TD&gt;App10&lt;/TD&gt;&lt;TD&gt;22-11-2024&lt;/TD&gt;&lt;TD&gt;19-12-2024&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;FG02&lt;/TD&gt;&lt;TD&gt;App11&lt;/TD&gt;&lt;TD&gt;22-04-2024&lt;/TD&gt;&lt;TD&gt;15-06-2024&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;FG03&lt;/TD&gt;&lt;TD&gt;App12&lt;/TD&gt;&lt;TD&gt;20-02-2025&lt;/TD&gt;&lt;TD&gt;19-03-2025&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Thu, 05 Oct 2023 17:42:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3462248#M132069</guid>
      <dc:creator>Vaibhav3008</dc:creator>
      <dc:date>2023-10-05T17:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: Count of rows based on start date and end date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3462276#M132071</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="537446" data-lia-user-login="Vaibhav3008" class="lia-mention lia-mention-user"&gt;Vaibhav3008&lt;/a&gt;&amp;nbsp;Hi!&lt;BR /&gt;you need to create two measures, you can find the solution in the attached pbix&lt;BR /&gt;If I answered correctly, accept my answer as a solution, otherwise direct the problem to me and we will solve it!&lt;BR /&gt;&lt;BR /&gt;BBF&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 17:50:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3462276#M132071</guid>
      <dc:creator>BeaBF</dc:creator>
      <dc:date>2023-10-05T17:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: Count of rows based on start date and end date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3462309#M132077</link>
      <description>&lt;P&gt;Thanks for the all the help on this.&lt;/P&gt;&lt;P&gt;Currently the count is only taking start date into account. I need the count of apps falling in between start and end dates. Example - App11 should be counted in April 2024, May 2024 and June 2024 because the start and end dates are like that. Another example - App05 should be counted in November 2024 and December 2024.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 18:04:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3462309#M132077</guid>
      <dc:creator>Vaibhav3008</dc:creator>
      <dc:date>2023-10-05T18:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Count of rows based on start date and end date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3462401#M132083</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="537446" data-lia-user-login="Vaibhav3008" class="lia-mention lia-mention-user"&gt;Vaibhav3008&lt;/a&gt;&amp;nbsp;Sorry!&lt;BR /&gt;&lt;BR /&gt;Try with this new,&lt;/P&gt;
&lt;P&gt;BBF&lt;/P&gt;</description>
      <pubDate>Thu, 05 Oct 2023 18:43:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3462401#M132083</guid>
      <dc:creator>BeaBF</dc:creator>
      <dc:date>2023-10-05T18:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: Count of rows based on start date and end date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3463022#M132109</link>
      <description>&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;I am actually doing the same thing which you did here. But somehow it's not working.&lt;/P&gt;&lt;P&gt;As you can see in the pic below. The count for June 2023 should be atleast 4 (App01, App02, App03 and App04 all are falling inside June 2023). But the count in graph is coming as 1 only for June 2023.&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 04:46:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3463022#M132109</guid>
      <dc:creator>Vaibhav3008</dc:creator>
      <dc:date>2023-10-06T04:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: Count of rows based on start date and end date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3463194#M132123</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="537446" data-lia-user-login="Vaibhav3008" class="lia-mention lia-mention-user"&gt;Vaibhav3008&lt;/a&gt;&amp;nbsp;right, here the code adjusted&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BBF&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 07:16:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3463194#M132123</guid>
      <dc:creator>BeaBF</dc:creator>
      <dc:date>2023-10-06T07:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Count of rows based on start date and end date column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3463245#M132127</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;A href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/537446" target="_blank" rel="noopener"&gt;@Vaibhav3008,&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on your description, I make the new DAX expression, you may check the result below:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;App Count = 
var _selyear=SELECTEDVALUE('DateTable'[Date].[Year])
var _selmonth=SELECTEDVALUE('DateTable'[Date].[MonthNo])
var _date1= EOMONTH(date(_selyear,_selmonth,1),0)
var _date2= date(_selyear,_selmonth,1)
return
COUNTROWS(
    FILTER(
        'Table',
        'Table'[Start Date] &amp;lt;=_date1 &amp;amp;&amp;amp;
        'Table'[End Date] &amp;gt;=  _date2
    )

)&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope it helps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Community Support Team_ Scott Chang&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps then please consider&amp;nbsp;Accept it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Oct 2023 07:45:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Count-of-rows-based-on-start-date-and-end-date-column/m-p/3463245#M132127</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-06T07:45:30Z</dc:date>
    </item>
  </channel>
</rss>

