<?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: Distinct values of a column with filttering by another column in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-values-of-a-column-with-filttering-by-another-column/m-p/1328699#M23487</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="124430" data-lia-user-login="CAPSTALKER" class="lia-mention lia-mention-user"&gt;CAPSTALKER&lt;/a&gt; , Try like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;unique dates =   CALCULATE(
           DISTINCTCOUNT(RUM[date]),
           FILTER(RUM, not( RUM[email] in {"dummy@dotcom.com"  , "kim@dot.com" })))		&lt;/LI-CODE&gt;</description>
    <pubDate>Thu, 27 Aug 2020 11:09:22 GMT</pubDate>
    <dc:creator>amitchandak</dc:creator>
    <dc:date>2020-08-27T11:09:22Z</dc:date>
    <item>
      <title>Distinct values of a column with filttering by another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-values-of-a-column-with-filttering-by-another-column/m-p/1328544#M23480</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm new to Power BI and DAX, so thanks in advance for helping.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a table named RUM:&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;email&lt;/TD&gt;&lt;TD&gt;date&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;crash@test.com&lt;/TD&gt;&lt;TD&gt;2020-08-26&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;crash@test.com&lt;/TD&gt;&lt;TD&gt;2020-08-27&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;test@dummy.com&lt;/TD&gt;&lt;TD&gt;2020-08-27&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;test@dummy.com&lt;/TD&gt;&lt;TD&gt;2020-08-27&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;dummy@dotcom.com&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;2020-10-10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;dummy@dotcom.com&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;2020-10-10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;kim@dot.com&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;2020-01-01&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to get number of distinct dates for each email address while at same time filttering some of emails.&amp;nbsp;&lt;/P&gt;&lt;P&gt;From the table above result should be:&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;email&lt;/TD&gt;&lt;TD&gt;unique dates&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;crash@test.com&lt;/TD&gt;&lt;TD&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;test@dummy.com&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;I have following DAX but I'm not totally sure if it gives the right kind of result.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;unique dates =&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; CALCULATE(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;DISTINCTCOUNT(RUM[date]),&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;FILTER(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RUM,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RUM[email] &amp;lt;&amp;gt; "dummy@dotcom.com"&amp;nbsp;&amp;nbsp;&amp;amp;&amp;amp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;RUM[email] &amp;lt;&amp;gt; "kim@dot.com"&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know there are multiple ways to do this and would prefer the simplest. Any help and comments will be highly appreciated.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 10:10:34 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-values-of-a-column-with-filttering-by-another-column/m-p/1328544#M23480</guid>
      <dc:creator>CAPSTALKER</dc:creator>
      <dc:date>2020-08-27T10:10:34Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct values of a column with filttering by another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-values-of-a-column-with-filttering-by-another-column/m-p/1328648#M23483</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="124430" data-lia-user-login="CAPSTALKER" class="lia-mention lia-mention-user"&gt;CAPSTALKER&lt;/a&gt;&amp;nbsp;-&lt;/P&gt;
&lt;P&gt;I do not see any issue with what you have in your calculation. Another way to do it is:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;unique dates =
  COUNTROWS(
    DISTINCT(
      SELECTCOLUMNS(
        FILTER(RUM,RUM[email]&amp;lt;&amp;gt;"dummy@dotcom.com" &amp;amp;&amp;amp; RUM[email]&amp;lt;&amp;gt;"kim@dot.com"),
        "date",[date]
      )
    )
  )&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Aug 2020 11:02:40 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-values-of-a-column-with-filttering-by-another-column/m-p/1328648#M23483</guid>
      <dc:creator>Greg_Deckler</dc:creator>
      <dc:date>2020-08-27T11:02:40Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct values of a column with filttering by another column</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-values-of-a-column-with-filttering-by-another-column/m-p/1328699#M23487</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="124430" data-lia-user-login="CAPSTALKER" class="lia-mention lia-mention-user"&gt;CAPSTALKER&lt;/a&gt; , Try like&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;unique dates =   CALCULATE(
           DISTINCTCOUNT(RUM[date]),
           FILTER(RUM, not( RUM[email] in {"dummy@dotcom.com"  , "kim@dot.com" })))		&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 27 Aug 2020 11:09:22 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Distinct-values-of-a-column-with-filttering-by-another-column/m-p/1328699#M23487</guid>
      <dc:creator>amitchandak</dc:creator>
      <dc:date>2020-08-27T11:09:22Z</dc:date>
    </item>
  </channel>
</rss>

