<?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 two dates one id in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/dax-two-dates-one-id/m-p/2813643#M39039</link>
    <description>&lt;P&gt;Dear all&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have 2 dates and id column in one table I want to have calendar to calculate how many different id's appeared within each date, I used countrows and working good but it calculate all rows not the distinct one. I want to cxount only distinct count of id's&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this the calculated column I used&lt;/P&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CouncilCount = 
var _CurrentRowValue = CountBook[Date]
RETURN
COUNTROWS(
    Filter(Sheet1,
    _CurrentRowValue=Sheet1[CancelDate]
))&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MicrosoftTeams-image (1).png" style="width: 708px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/797383i534DF30967DE006D/image-size/large?v=v2&amp;amp;px=999" role="button" title="MicrosoftTeams-image (1).png" alt="MicrosoftTeams-image (1).png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 03 Oct 2022 10:31:10 GMT</pubDate>
    <dc:creator>mustafaelryah33</dc:creator>
    <dc:date>2022-10-03T10:31:10Z</dc:date>
    <item>
      <title>dax two dates one id</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/dax-two-dates-one-id/m-p/2813643#M39039</link>
      <description>&lt;P&gt;Dear all&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;I have 2 dates and id column in one table I want to have calendar to calculate how many different id's appeared within each date, I used countrows and working good but it calculate all rows not the distinct one. I want to cxount only distinct count of id's&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;this the calculated column I used&lt;/P&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CouncilCount = 
var _CurrentRowValue = CountBook[Date]
RETURN
COUNTROWS(
    Filter(Sheet1,
    _CurrentRowValue=Sheet1[CancelDate]
))&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;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MicrosoftTeams-image (1).png" style="width: 708px;"&gt;&lt;img src="https://community.fabric.microsoft.com/t5/image/serverpage/image-id/797383i534DF30967DE006D/image-size/large?v=v2&amp;amp;px=999" role="button" title="MicrosoftTeams-image (1).png" alt="MicrosoftTeams-image (1).png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Oct 2022 10:31:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/dax-two-dates-one-id/m-p/2813643#M39039</guid>
      <dc:creator>mustafaelryah33</dc:creator>
      <dc:date>2022-10-03T10:31:10Z</dc:date>
    </item>
    <item>
      <title>Re: dax two dates one id</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/dax-two-dates-one-id/m-p/2815841#M39053</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please use&amp;nbsp;DISTINCTCOUNT(&amp;lt;column&amp;gt;) to count the distinct one. In your case, code like the following:Best Regards&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CouncilCount =&lt;/P&gt;
&lt;P&gt;VAR _CurrentRowValue = CountBook[Date]&lt;/P&gt;
&lt;P&gt;RETURN CALCULATE( DISTINCTCOUNT( Sheet1[ID] ), FILTER( Sheet1, _CurrentRowValue = Sheet1[CancelDate] ) )&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;If it does not work, please provide some example data and expect output&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ chenwu zhu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 05:45:27 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/dax-two-dates-one-id/m-p/2815841#M39053</guid>
      <dc:creator>v-chenwuz-msft</dc:creator>
      <dc:date>2022-10-04T05:45:27Z</dc:date>
    </item>
    <item>
      <title>Re: dax two dates one id</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/dax-two-dates-one-id/m-p/2815853#M39054</link>
      <description>&lt;P&gt;Thanks for your reply&lt;/P&gt;&lt;P&gt;IT works with another formula using early&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;CouncilCount = 

CALCULATE(DISTINCTCOUNT('Sheet1'[id]),

filter(Sheet1,

       Sheet1[pCancelDate]=earlier(CountBook[Date])

   )

)&lt;/LI-CODE&gt;</description>
      <pubDate>Tue, 04 Oct 2022 05:52:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/dax-two-dates-one-id/m-p/2815853#M39054</guid>
      <dc:creator>mustafaelryah33</dc:creator>
      <dc:date>2022-10-04T05:52:43Z</dc:date>
    </item>
    <item>
      <title>Re: dax two dates one id</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/dax-two-dates-one-id/m-p/2815893#M39056</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.fabric.microsoft.com/t5/user/viewprofilepage/user-id/450655"&gt;@mustafaelryah33&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm glad your problem was solved, please mark it as a solution so that more people can find it quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards&lt;/P&gt;
&lt;P&gt;Community Support Team _ chenwu zhu&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 06:13:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/dax-two-dates-one-id/m-p/2815893#M39056</guid>
      <dc:creator>v-chenwuz-msft</dc:creator>
      <dc:date>2022-10-04T06:13:10Z</dc:date>
    </item>
  </channel>
</rss>

