<?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: Change from Countx to DistinctCount in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-from-Countx-to-DistinctCount/m-p/2212207#M52229</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="270315" data-lia-user-login="doubleclick" class="lia-mention lia-mention-user"&gt;doubleclick&lt;/a&gt; , Try like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;calculate( distinctcount(MainTableDE[Worker]) ,All('Calendar'),filter( MainTable,(DATEDIFF(MainTable[Start Date],EoM,DAY)&amp;gt;=365)),MainTable[Start Date]&amp;lt;=EoM,ABS(&lt;BR /&gt;MainTable[End Date]&amp;gt;=SoM))&lt;/P&gt;</description>
    <pubDate>Mon, 29 Nov 2021 14:55:30 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2021-11-29T14:55:30Z</dc:date>
    <item>
      <title>Change from Countx to DistinctCount</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-from-Countx-to-DistinctCount/m-p/2211988#M52216</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a cool formula here but i'm having trouble converting it to a distinct count&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to change the below into a distinctcount of a column called [Worker] - how can i change this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Tenure by Day (Count over 365 days) = 
VAR SoM=min('Calendar'[Date])
VAR EoM=max('Calendar'[Date])
RETURN countx(CALCULATETABLE(MainTable,All('Calendar'),filter(MainTable,(DATEDIFF(MainTable[Start Date],EoM,DAY)&amp;gt;=365)),MainTable[Start Date]&amp;lt;=EoM,ABS(
MainTable[End Date]&amp;gt;=SoM)),DATEDIFF(MainTableDE[Start Date],EoM,DAY))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 12:29:03 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-from-Countx-to-DistinctCount/m-p/2211988#M52216</guid>
      <dc:creator>doubleclick</dc:creator>
      <dc:date>2021-11-29T12:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Change from Countx to DistinctCount</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-from-Countx-to-DistinctCount/m-p/2212207#M52229</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="270315" data-lia-user-login="doubleclick" class="lia-mention lia-mention-user"&gt;doubleclick&lt;/a&gt; , Try like &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;calculate( distinctcount(MainTableDE[Worker]) ,All('Calendar'),filter( MainTable,(DATEDIFF(MainTable[Start Date],EoM,DAY)&amp;gt;=365)),MainTable[Start Date]&amp;lt;=EoM,ABS(&lt;BR /&gt;MainTable[End Date]&amp;gt;=SoM))&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 14:55:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-from-Countx-to-DistinctCount/m-p/2212207#M52229</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2021-11-29T14:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Change from Countx to DistinctCount</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-from-Countx-to-DistinctCount/m-p/2212297#M52234</link>
      <description>&lt;P&gt;Thank you so much!!!! This fixed it - Issue Resolved!&lt;/P&gt;</description>
      <pubDate>Mon, 29 Nov 2021 15:53:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-from-Countx-to-DistinctCount/m-p/2212297#M52234</guid>
      <dc:creator>doubleclick</dc:creator>
      <dc:date>2021-11-29T15:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: Change from Countx to DistinctCount</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-from-Countx-to-DistinctCount/m-p/3348896#M125746</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i want transformed countx to distinctcount in this formule :&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Count lots Months 2 = &lt;/SPAN&gt;&lt;SPAN&gt;VAR&lt;/SPAN&gt; &lt;SPAN&gt;__Table&lt;/SPAN&gt;&lt;SPAN&gt; = &lt;/SPAN&gt;&lt;SPAN&gt;GROUPBY&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;'dw V_F_ObjetQuittanceSinistre'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;'dw V_F_ObjetQuittanceSinistre'&lt;/SPAN&gt;&lt;SPAN&gt;[DateReference_AnneeMois]&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;"__Count"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;COUNTX&lt;/SPAN&gt;&lt;SPAN&gt; (&lt;/SPAN&gt;&lt;SPAN&gt;CURRENTGROUP&lt;/SPAN&gt;&lt;SPAN&gt;(),&lt;/SPAN&gt;&lt;SPAN&gt;[Lots]&lt;/SPAN&gt;&lt;SPAN&gt;))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;RETURN&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &lt;/SPAN&gt;&lt;SPAN&gt;MAXX&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;__Table&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;SPAN&gt;[__Count]&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 25 Jul 2023 13:47:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Change-from-Countx-to-DistinctCount/m-p/3348896#M125746</guid>
      <dc:creator>gotohbh</dc:creator>
      <dc:date>2023-07-25T13:47:21Z</dc:date>
    </item>
  </channel>
</rss>

