<?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: DistinctCount ONLY the lowest values of a column in case of multiple rows in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DistinctCount-ONLY-the-lowest-values-of-a-column-in-case-of/m-p/4272369#M169469</link>
    <description>&lt;P&gt;Had to change COUNT to DISTINCTCOUNT but worked like a charm, thank you sir!&lt;/P&gt;</description>
    <pubDate>Wed, 06 Nov 2024 10:29:22 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-06T10:29:22Z</dc:date>
    <item>
      <title>DistinctCount ONLY the lowest values of a column in case of multiple rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DistinctCount-ONLY-the-lowest-values-of-a-column-in-case-of/m-p/4272271#M169455</link>
      <description>&lt;P&gt;I'm looking for a DAX calculation which does DISTINCTCOUNT with a certain condition. If a Customer has two different Priorities, it should only do a count on the &lt;STRONG&gt;lowest&lt;/STRONG&gt; Priority. To demonstrate with dummy data:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Customer Priority&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Jan&lt;/TD&gt;&lt;TD&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Tom&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Dirk&lt;/TD&gt;&lt;TD&gt;6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Jan&lt;/TD&gt;&lt;TD&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You see that Customer Jan has two rows, one with Priority 5 and 1. In this case I want to DISTINCTCOUNT the Customer only for the &lt;STRONG&gt;lowest&lt;/STRONG&gt; Priority, being 1 in this case. The end result should look as follows.&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;Thanks in advance!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 09:31:59 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DistinctCount-ONLY-the-lowest-values-of-a-column-in-case-of/m-p/4272271#M169455</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-06T09:31:59Z</dc:date>
    </item>
    <item>
      <title>Re: DistinctCount ONLY the lowest values of a column in case of multiple rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DistinctCount-ONLY-the-lowest-values-of-a-column-in-case-of/m-p/4272312#M169461</link>
      <description>&lt;P&gt;Just do a distinct count of the customer, that will only count them once no matter how many times they appear in the table.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 09:58:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DistinctCount-ONLY-the-lowest-values-of-a-column-in-case-of/m-p/4272312#M169461</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2024-11-06T09:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: DistinctCount ONLY the lowest values of a column in case of multiple rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DistinctCount-ONLY-the-lowest-values-of-a-column-in-case-of/m-p/4272318#M169463</link>
      <description>&lt;P&gt;That's the thing, I don't want to just do a Distinct Count of the Customer because then a Customer with &lt;STRONG&gt;two rows&lt;/STRONG&gt; will be counted twice (in this case in Priority 5 and 1). While I only want it to be counted once, for the lowest Priority (1).&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 10:03:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DistinctCount-ONLY-the-lowest-values-of-a-column-in-case-of/m-p/4272318#M169463</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-06T10:03:02Z</dc:date>
    </item>
    <item>
      <title>Re: DistinctCount ONLY the lowest values of a column in case of multiple rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DistinctCount-ONLY-the-lowest-values-of-a-column-in-case-of/m-p/4272329#M169465</link>
      <description>&lt;P&gt;That's not how a distinct count works, that's how a count works. A count would return 2 for a customer with 2 rows, a distinct count will only return 1 for a customer no matter how many times they appear.&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 10:09:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DistinctCount-ONLY-the-lowest-values-of-a-column-in-case-of/m-p/4272329#M169465</guid>
      <dc:creator>johnt75</dc:creator>
      <dc:date>2024-11-06T10:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: DistinctCount ONLY the lowest values of a column in case of multiple rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DistinctCount-ONLY-the-lowest-values-of-a-column-in-case-of/m-p/4272333#M169467</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp; Try this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DistinctCountLowestPriority = 
CALCULATE(
    COUNT('Table'[Customer]),
    FILTER(
        'Table',
        'Table'[Priority] = CALCULATE(MIN('Table'[Priority]), ALLEXCEPT('Table', 'Table'[Customer]))
    )
)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps!!&lt;/P&gt;&lt;P&gt;If this solved your problem, please accept it as a solution and a kudos!!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;BR /&gt;Shahariar Hafiz&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 10:12:31 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DistinctCount-ONLY-the-lowest-values-of-a-column-in-case-of/m-p/4272333#M169467</guid>
      <dc:creator>shafiz_p</dc:creator>
      <dc:date>2024-11-06T10:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: DistinctCount ONLY the lowest values of a column in case of multiple rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DistinctCount-ONLY-the-lowest-values-of-a-column-in-case-of/m-p/4272341#M169468</link>
      <description>&lt;P&gt;That's true yes. But as I said, I want to return 1 for a Customer which appear twice in the data (in Priority 5 and 1). Distinct Count returns a 1 for both the Priorities, but I only want to return it for the lowest Priority. So not with Priority 5.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 10:14:21 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DistinctCount-ONLY-the-lowest-values-of-a-column-in-case-of/m-p/4272341#M169468</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-06T10:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: DistinctCount ONLY the lowest values of a column in case of multiple rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DistinctCount-ONLY-the-lowest-values-of-a-column-in-case-of/m-p/4272369#M169469</link>
      <description>&lt;P&gt;Had to change COUNT to DISTINCTCOUNT but worked like a charm, thank you sir!&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 10:29:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/DistinctCount-ONLY-the-lowest-values-of-a-column-in-case-of/m-p/4272369#M169469</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-06T10:29:22Z</dc:date>
    </item>
  </channel>
</rss>

