<?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 finding Superset and subset in dax in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/finding-Superset-and-subset-in-dax/m-p/3737346#M145693</link>
    <description>&lt;P&gt;Hi team&lt;BR /&gt;i am having table called "PACKAGE" which is having two coumns as below&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now wanted to find superset package and supset package from the table (with connection)&lt;BR /&gt;note: the above is sample data the package is more the 700 and need to find the superset and subset package from all the 700&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;can someone please help me out to get it done?&lt;/P&gt;</description>
    <pubDate>Sat, 02 Mar 2024 03:20:48 GMT</pubDate>
    <dc:creator>rajeshapunu1234</dc:creator>
    <dc:date>2024-03-02T03:20:48Z</dc:date>
    <item>
      <title>finding Superset and subset in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/finding-Superset-and-subset-in-dax/m-p/3737346#M145693</link>
      <description>&lt;P&gt;Hi team&lt;BR /&gt;i am having table called "PACKAGE" which is having two coumns as below&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;now wanted to find superset package and supset package from the table (with connection)&lt;BR /&gt;note: the above is sample data the package is more the 700 and need to find the superset and subset package from all the 700&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;can someone please help me out to get it done?&lt;/P&gt;</description>
      <pubDate>Sat, 02 Mar 2024 03:20:48 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/finding-Superset-and-subset-in-dax/m-p/3737346#M145693</guid>
      <dc:creator>rajeshapunu1234</dc:creator>
      <dc:date>2024-03-02T03:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: finding Superset and subset in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/finding-Superset-and-subset-in-dax/m-p/3737546#M145706</link>
      <description>&lt;P&gt;To find the superset and subset packages from your table in Power BI using DAX, you can follow these steps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Create Relationships&lt;/STRONG&gt;: Ensure that there is a relationship between the "PACKAGE" table and itself. This is necessary to establish connections between packages.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Define Measures&lt;/STRONG&gt;: You can define DAX measures to identify superset and subset packages.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here's how you can define the measures:&lt;/P&gt;&lt;H3&gt;Measure for Superset Packages:&lt;/H3&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Superset Packages =&lt;BR /&gt;VAR CurrentPackage = SELECTEDVALUE('PACKAGE'[P])&lt;BR /&gt;RETURN&lt;BR /&gt;COUNTROWS(&lt;BR /&gt;FILTER(&lt;BR /&gt;VALUES('PACKAGE'[P]),&lt;BR /&gt;COUNTROWS(&lt;BR /&gt;INTERSECT(&lt;BR /&gt;VALUES('PACKAGE'[T]),&lt;BR /&gt;VALUES('PACKAGE'[T])&lt;BR /&gt;)&lt;BR /&gt;) = COUNTROWS(VALUES('PACKAGE'[T]))&lt;BR /&gt;&amp;amp;&amp;amp; SELECTEDVALUE('PACKAGE'[P]) &amp;lt;&amp;gt; CurrentPackage&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;Measure for Subset Packages:&lt;/H3&gt;&lt;P&gt;Subset Packages =&lt;BR /&gt;VAR CurrentPackage = SELECTEDVALUE('PACKAGE'[P])&lt;BR /&gt;RETURN&lt;BR /&gt;COUNTROWS(&lt;BR /&gt;FILTER(&lt;BR /&gt;VALUES('PACKAGE'[P]),&lt;BR /&gt;COUNTROWS(&lt;BR /&gt;INTERSECT(&lt;BR /&gt;VALUES('PACKAGE'[T]),&lt;BR /&gt;VALUES('PACKAGE'[T])&lt;BR /&gt;)&lt;BR /&gt;) = COUNTROWS(VALUES('PACKAGE'[T]))&lt;BR /&gt;&amp;amp;&amp;amp; SELECTEDVALUE('PACKAGE'[P]) &amp;lt;&amp;gt; CurrentPackage&lt;BR /&gt;)&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;H3&gt;Explanation:&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;The Superset Packages measure calculates the number of packages where all the tests in the current package are also present.&lt;/LI&gt;&lt;LI&gt;The Subset Packages measure calculates the number of packages where the current package contains all the tests.&lt;/LI&gt;&lt;/UL&gt;&lt;H3&gt;Usage:&lt;/H3&gt;&lt;P&gt;You can add these measures to a table or matrix visual alongside the package names to see which packages are superset or subset of others.&lt;/P&gt;&lt;H3&gt;Note:&lt;/H3&gt;&lt;UL&gt;&lt;LI&gt;Ensure that the relationships between tables are properly established in your Power BI data model.&lt;/LI&gt;&lt;LI&gt;These measures assume that each package has a unique identifier, and each test within the package is unique. Adjustments might be needed if this assumption doesn't hold true for your data.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;You can adjust these measures according to your specific requirements and data model. Make sure to test them with your dataset to ensure accuracy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In case there is still a problem, please feel free and explain your issue in detail,&amp;nbsp;It will be my pleasure to assist you in any way I can.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Mar 2024 10:27:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/finding-Superset-and-subset-in-dax/m-p/3737546#M145706</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2024-03-02T10:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: finding Superset and subset in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/finding-Superset-and-subset-in-dax/m-p/3745134#M146052</link>
      <description>&lt;P&gt;&lt;SPAN&gt;i am having table name called package with below data&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;PackageTest&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Package 1&lt;/TD&gt;&lt;TD&gt;Test 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Package 1&lt;/TD&gt;&lt;TD&gt;Test 2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Package 1&lt;/TD&gt;&lt;TD&gt;Test 3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Package 1&lt;/TD&gt;&lt;TD&gt;Test 4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Package 1&lt;/TD&gt;&lt;TD&gt;Test 5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Package 1&lt;/TD&gt;&lt;TD&gt;Test 6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Package 2&lt;/TD&gt;&lt;TD&gt;Test 2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Package 2&lt;/TD&gt;&lt;TD&gt;Test 5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Package 2&lt;/TD&gt;&lt;TD&gt;Test 6&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Package 3&lt;/TD&gt;&lt;TD&gt;Test 1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Package 3&lt;/TD&gt;&lt;TD&gt;Test 2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Package 4&lt;/TD&gt;&lt;TD&gt;Test 5&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Package 5&lt;/TD&gt;&lt;TD&gt;Test 10&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Package 5&lt;/TD&gt;&lt;TD&gt;Test 11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Package 5&lt;/TD&gt;&lt;TD&gt;Test 12&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN&gt;Now i want to find the superset package and subset package using dax in power bi (can acheive using calculated table or measure)&lt;BR /&gt;Condition for find superset is the package which is having more test and which can be consider of parent package&lt;BR /&gt;condition for subset is all the test in the package should be available in superset package (if any one test in the package not there in superset then it can not be considered as subset and also no test from superset package is available in any other package then that package cannot be considered as superset package instead can be considered as unique package)&lt;BR /&gt;Resultant table should come as below from the mentioned table&amp;nbsp;&lt;BR /&gt;Supersetsubsetsubset 2&lt;/SPAN&gt;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Package 1&lt;/TD&gt;&lt;TD&gt;Package 2&lt;/TD&gt;&lt;TD&gt;Package 4&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Package 1&lt;/TD&gt;&lt;TD&gt;Package 3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;Package 5&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;please supprot me to get it done by DAX&lt;BR /&gt;thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 06:58:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/finding-Superset-and-subset-in-dax/m-p/3745134#M146052</guid>
      <dc:creator>rajeshapunu1234</dc:creator>
      <dc:date>2024-03-06T06:58:25Z</dc:date>
    </item>
    <item>
      <title>Re: finding Superset and subset in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/finding-Superset-and-subset-in-dax/m-p/3747746#M146174</link>
      <description>&lt;P&gt;Certainly! To achieve this in Power BI using DAX, you can create calculated tables to identify the superset and subset relationships. Below is the DAX code to create these tables based on your conditions:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;Create Superset Table:&lt;/STRONG&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;STRONG&gt;Superset =&lt;BR /&gt;SUMMARIZECOLUMNS(&lt;BR /&gt;'PackageTest'[Package],&lt;BR /&gt;"IsSuperset",&lt;BR /&gt;IF(&lt;BR /&gt;COUNTROWS(FILTER('PackageTest', 'PackageTest'[Package] = EARLIER('PackageTest'[Package]))) &amp;gt; 1,&lt;BR /&gt;BLANK(),&lt;BR /&gt;1&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Create Subset Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Subset =&lt;BR /&gt;VAR AllTests = VALUES('PackageTest'[Test])&lt;BR /&gt;RETURN&lt;BR /&gt;SUMMARIZECOLUMNS(&lt;BR /&gt;'PackageTest'[Package],&lt;BR /&gt;"IsSubset",&lt;BR /&gt;IF(&lt;BR /&gt;COUNTROWS(FILTER(AllTests, NOT CONTAINSSTRING(CONCATENATEX(VALUES('PackageTest'[Test]), 'PackageTest'[Test], ","), 'PackageTest'[Test]))) &amp;gt; 0,&lt;BR /&gt;BLANK(),&lt;BR /&gt;1&lt;BR /&gt;)&lt;BR /&gt;)&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, you can use these tables to visualize the superset and subset relationships. Combine them into a matrix or table visual to see the results. The "IsSuperset" and "IsSubset" columns will indicate whether a package is a superset or a subset, respectively.&lt;/P&gt;&lt;P&gt;Additionally, you can create a final table that combines the information about superset and subset relationships:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FinalTable =&lt;BR /&gt;UNION(&lt;BR /&gt;SELECTCOLUMNS(FILTER('Superset', 'Superset'[IsSuperset] = 1), "Package 1", 'Superset'[Package], "Package 2", BLANK(), "Package 3", BLANK(), "Package 4", BLANK(), "Package 5", BLANK()),&lt;BR /&gt;SELECTCOLUMNS(FILTER('Subset', 'Subset'[IsSubset] = 1), "Package 1", BLANK(), "Package 2", 'Subset'[Package], "Package 3", BLANK(), "Package 4", BLANK(), "Package 5", BLANK())&lt;BR /&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This table will show the superset and subset relationships in the format you've specified.&lt;/P&gt;&lt;P&gt;Note: Make sure to replace 'PackageTest' with your actual table name in the DAX code. Adjust column names if they are different in your actual dataset.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If this post&amp;nbsp;helps, then please consider&amp;nbsp;Accepting it as the solution&amp;nbsp;to help the other members find it more quickly.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In case there is still a problem, please feel free and explain your issue in detail,&amp;nbsp;It will be my pleasure to assist you in any way I can.&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 05:16:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/finding-Superset-and-subset-in-dax/m-p/3747746#M146174</guid>
      <dc:creator>123abc</dc:creator>
      <dc:date>2024-03-07T05:16:11Z</dc:date>
    </item>
    <item>
      <title>Re: finding Superset and subset in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/finding-Superset-and-subset-in-dax/m-p/3748151#M146193</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;I am facing error below&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 08:17:39 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/finding-Superset-and-subset-in-dax/m-p/3748151#M146193</guid>
      <dc:creator>rajeshapunu1234</dc:creator>
      <dc:date>2024-03-07T08:17:39Z</dc:date>
    </item>
    <item>
      <title>Re: finding Superset and subset in dax</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/finding-Superset-and-subset-in-dax/m-p/3748213#M146196</link>
      <description>&lt;P&gt;and also it is sample data set i given to you&lt;BR /&gt;but actually i am having more than 700 packages and more than 5000 rows with the test column&lt;BR /&gt;there we cannot enter the package name manually as you mentioned in the final table DAX&lt;BR /&gt;&lt;BR /&gt;can you please suggest me any DAX combination to acheive?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 08:43:51 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/finding-Superset-and-subset-in-dax/m-p/3748213#M146196</guid>
      <dc:creator>rajeshapunu1234</dc:creator>
      <dc:date>2024-03-07T08:43:51Z</dc:date>
    </item>
  </channel>
</rss>

