<?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 Counting dates in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-dates/m-p/4261907#M168915</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have a table looking a items and for each there is a Date Opened and a Date Closed. I am trying to create a table to show, by team member, how many items they had opened and closed each day in the last 30 days.&lt;BR /&gt;&lt;BR /&gt;I've created a table and used Relative Date filter for last 30 days, but for some reason my counts of Open and Closed are showing the same number.&lt;BR /&gt;&lt;BR /&gt;At the moment I am dragging the Opened and Closed date fields into the table and counting. Do I need to use a measure instead and if so what would people suggest?&lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2024 08:47:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-10-29T08:47:22Z</dc:date>
    <item>
      <title>Counting dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-dates/m-p/4261907#M168915</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I have a table looking a items and for each there is a Date Opened and a Date Closed. I am trying to create a table to show, by team member, how many items they had opened and closed each day in the last 30 days.&lt;BR /&gt;&lt;BR /&gt;I've created a table and used Relative Date filter for last 30 days, but for some reason my counts of Open and Closed are showing the same number.&lt;BR /&gt;&lt;BR /&gt;At the moment I am dragging the Opened and Closed date fields into the table and counting. Do I need to use a measure instead and if so what would people suggest?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 08:47:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-dates/m-p/4261907#M168915</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-29T08:47:22Z</dc:date>
    </item>
    <item>
      <title>Re: Counting dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-dates/m-p/4261935#M168919</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp; Share example data and the expected result you want.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 09:08:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-dates/m-p/4261935#M168919</guid>
      <dc:creator>shafiz_p</dc:creator>
      <dc:date>2024-10-29T09:08:01Z</dc:date>
    </item>
    <item>
      <title>Re: Counting dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-dates/m-p/4261976#M168920</link>
      <description>&lt;P&gt;Sample Data:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;How I am trying to summarise:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I am at the moment bringing in the three fields (Manager, Date Opened, Date Closed) into a table and using a Relative Date filter to capture last 30 days.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2024 09:27:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-dates/m-p/4261976#M168920</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-29T09:27:40Z</dc:date>
    </item>
    <item>
      <title>Re: Counting dates</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-dates/m-p/4263102#M168970</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Pls try this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Create measures.&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;Opened Count = 
var _opendcount = CALCULATE(
    COUNTROWS('Table'),
    FILTER(
        'Table',
        'Table'[Date Opened] &amp;gt;= UTCNOW() - 30 &amp;amp;&amp;amp; 
        'Table'[Date Opened] &amp;lt;= UTCNOW()
    )
)
RETURN
IF(
    ISBLANK(_opendcount),
    0,
    _opendcount
)&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;Closed Count = 
var _closedcount = CALCULATE(
    COUNTROWS('Table'),
    FILTER(
        'Table',
        'Table'[Date Closed] &amp;gt;= UTCNOW() - 30 &amp;amp;&amp;amp; 
        'Table'[Date Closed] &amp;lt;= UTCNOW()
    )
)
RETURN 
IF(
    ISBLANK(_closedcount), 
    0,
    _closedcount
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Where you can use UTCNOW () to get relative dates.&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;Relative Date = UTCNOW()&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&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;Here is the result.&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;Regards,&lt;/P&gt;
&lt;P&gt;Nono Chen&lt;/P&gt;
&lt;P&gt;If this &lt;STRONG&gt;&lt;EM&gt;post&lt;/EM&gt;&lt;/STRONG&gt;&amp;nbsp;helps, 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;/P&gt;</description>
      <pubDate>Wed, 30 Oct 2024 02:33:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Counting-dates/m-p/4263102#M168970</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-10-30T02:33:36Z</dc:date>
    </item>
  </channel>
</rss>

