<?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 How do I count the unique values in Table A that contain Table B? in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-count-the-unique-values-in-Table-A-that-contain-Table-B/m-p/4272313#M169462</link>
    <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I desperately need help.&lt;/P&gt;&lt;P&gt;I have two tables in my model in power BI, Table A and Table B.&lt;/P&gt;&lt;P&gt;Table B has unique values.The two tables already have a “one-to-many” relationship in the model.&lt;/P&gt;&lt;P&gt;How do you count the unique quantity of a type A that contains B?&lt;/P&gt;&lt;P&gt;Thank you so much&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;</description>
    <pubDate>Wed, 06 Nov 2024 09:58:24 GMT</pubDate>
    <dc:creator>Yumikang</dc:creator>
    <dc:date>2024-11-06T09:58:24Z</dc:date>
    <item>
      <title>How do I count the unique values in Table A that contain Table B?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-count-the-unique-values-in-Table-A-that-contain-Table-B/m-p/4272313#M169462</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;&lt;P&gt;I desperately need help.&lt;/P&gt;&lt;P&gt;I have two tables in my model in power BI, Table A and Table B.&lt;/P&gt;&lt;P&gt;Table B has unique values.The two tables already have a “one-to-many” relationship in the model.&lt;/P&gt;&lt;P&gt;How do you count the unique quantity of a type A that contains B?&lt;/P&gt;&lt;P&gt;Thank you so much&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;</description>
      <pubDate>Wed, 06 Nov 2024 09:58:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-count-the-unique-values-in-Table-A-that-contain-Table-B/m-p/4272313#M169462</guid>
      <dc:creator>Yumikang</dc:creator>
      <dc:date>2024-11-06T09:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count the unique values in Table A that contain Table B?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-count-the-unique-values-in-Table-A-that-contain-Table-B/m-p/4272328#M169464</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="778701" data-lia-user-login="Yumikang" class="lia-mention lia-mention-user"&gt;Yumikang&lt;/a&gt;&amp;nbsp;, You can try below measure:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Unique Count = CALCULATE(DISTINCTCOUNT(SheetA[Key Field]),SheetB[Key Field]&amp;lt;&amp;gt;BLANK())&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 10:08:28 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-count-the-unique-values-in-Table-A-that-contain-Table-B/m-p/4272328#M169464</guid>
      <dc:creator>xifeng_L</dc:creator>
      <dc:date>2024-11-06T10:08:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I count the unique values in Table A that contain Table B?</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-count-the-unique-values-in-Table-A-that-contain-Table-B/m-p/4272330#M169466</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="778701" data-lia-user-login="Yumikang" class="lia-mention lia-mention-user"&gt;Yumikang&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://d13ot9o61jdzpp.cloudfront.net/files/pbiforum/Yumikang.pbix" target="_self"&gt;Download PBIX file with the example shown below&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The tables are linked together by a relationship on a column, let's call it RelCol.&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In a Table visual add RelCol from Table B, then add the column from Table A that you want the unique count of and choose the aggregation Count (Distinct).&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In my example I want the distinct count of Column1&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;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Phil&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 10:21:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-do-I-count-the-unique-values-in-Table-A-that-contain-Table-B/m-p/4272330#M169466</guid>
      <dc:creator>PhilipTreacy</dc:creator>
      <dc:date>2024-11-06T10:21:26Z</dc:date>
    </item>
  </channel>
</rss>

