<?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 code for identifying if an ID is part of multiple groups in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-code-for-identifying-if-an-ID-is-part-of-multiple-groups/m-p/3451589#M131498</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I have a dataset as shown below:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Group&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;400&lt;/TD&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;400&lt;/TD&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;TD&gt;G&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;600&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;600&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;600&lt;/TD&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;600&lt;/TD&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;600&lt;/TD&gt;&lt;TD&gt;G&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;From this dataset I want to get the number of IDs which are part of only one group and number of IDs that are part of 2 groups and so on. In this case, IDs 200 and 300 are part of only single groups while 100 and 400 are part of 2 groups.&amp;nbsp;&lt;BR /&gt;Similarly 500 and 600 are part of more than 2 groups.&lt;BR /&gt;&lt;BR /&gt;So could someone help me with measure calculations that gives me the result as:&lt;BR /&gt;Number of IDs that are part of a single group&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: 2&lt;BR /&gt;Number of IDs that are part of 2 groups&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : 2&lt;BR /&gt;Number of IDs that are part of more than 2 groups&amp;nbsp; : 2&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for your support here.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 28 Sep 2023 11:26:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-09-28T11:26:33Z</dc:date>
    <item>
      <title>Dax code for identifying if an ID is part of multiple groups</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-code-for-identifying-if-an-ID-is-part-of-multiple-groups/m-p/3451589#M131498</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;&lt;BR /&gt;I have a dataset as shown below:&lt;/P&gt;&lt;TABLE border="0" cellspacing="0" cellpadding="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;ID&lt;/TD&gt;&lt;TD&gt;Group&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;100&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;300&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;400&lt;/TD&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;400&lt;/TD&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;TD&gt;G&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;TD&gt;A&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;500&lt;/TD&gt;&lt;TD&gt;B&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;600&lt;/TD&gt;&lt;TD&gt;C&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;600&lt;/TD&gt;&lt;TD&gt;D&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;600&lt;/TD&gt;&lt;TD&gt;E&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;600&lt;/TD&gt;&lt;TD&gt;F&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;600&lt;/TD&gt;&lt;TD&gt;G&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;From this dataset I want to get the number of IDs which are part of only one group and number of IDs that are part of 2 groups and so on. In this case, IDs 200 and 300 are part of only single groups while 100 and 400 are part of 2 groups.&amp;nbsp;&lt;BR /&gt;Similarly 500 and 600 are part of more than 2 groups.&lt;BR /&gt;&lt;BR /&gt;So could someone help me with measure calculations that gives me the result as:&lt;BR /&gt;Number of IDs that are part of a single group&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;: 2&lt;BR /&gt;Number of IDs that are part of 2 groups&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; : 2&lt;BR /&gt;Number of IDs that are part of more than 2 groups&amp;nbsp; : 2&lt;BR /&gt;&lt;BR /&gt;Thanks a lot for your support here.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 28 Sep 2023 11:26:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-code-for-identifying-if-an-ID-is-part-of-multiple-groups/m-p/3451589#M131498</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-09-28T11:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Dax code for identifying if an ID is part of multiple groups</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-code-for-identifying-if-an-ID-is-part-of-multiple-groups/m-p/3452907#M131562</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;You can follow below steps,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Create a new custom column to count the ID that are part of a group,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CountData = CALCULATE(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; COUNT(Grps[Group]), // counting the Type&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; FILTER(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Grps, // filtering the table to get the count of type groupoed by Make&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Grps[ID] = EARLIER(Grps[ID])&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;Then Create 3 Measure in order to get Single Group, Two Group, Multiple Group ID counts with below DAX expressions,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Single Grp = CALCULATE( COUNT(Grps[Group]), Grps[CountData] =1)&lt;/P&gt;&lt;P&gt;Two Grps = CALCULATE( COUNT(Grps[Group]), Grps[CountData] =2)&lt;/P&gt;&lt;P&gt;Multiple Grps = CALCULATE( COUNT(Grps[Group]), Grps[CountData] &amp;gt;2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The result will be as follows,&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Inogic Professional Services Division&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Power Platform and Microsoft Dynamics 365 CRM Development – All under one roof!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Drop an email at &lt;/SPAN&gt;&lt;A href="mailto:crm@inogic.com" target="_blank"&gt;crm@inogic.com&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Services:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://www.inogic.com/services/" target="_blank"&gt;http://www.inogic.com/services/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Power Platform/Dynamics 365 CRM Tips and Tricks:&amp;nbsp; &lt;/SPAN&gt;&lt;A href="http://www.inogic.com/blog/" target="_blank"&gt;http://www.inogic.com/blog/&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Sep 2023 06:24:54 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-code-for-identifying-if-an-ID-is-part-of-multiple-groups/m-p/3452907#M131562</guid>
      <dc:creator>SamInogic</dc:creator>
      <dc:date>2023-09-29T06:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: Dax code for identifying if an ID is part of multiple groups</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-code-for-identifying-if-an-ID-is-part-of-multiple-groups/m-p/3459145#M131909</link>
      <description>&lt;P&gt;It works.&lt;BR /&gt;Thanks a lot for your help here.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Oct 2023 09:22:24 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Dax-code-for-identifying-if-an-ID-is-part-of-multiple-groups/m-p/3459145#M131909</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-10-04T09:22:24Z</dc:date>
    </item>
  </channel>
</rss>

