<?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: Compliance check of 2 tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compliance-check-of-2-tables/m-p/2936192#M96781</link>
    <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;You can use the LOOKUPVALUE function to compare fields from tables that are not related.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/lookupvalue-function-dax" target="_blank"&gt;https://learn.microsoft.com/en-us/dax/lookupvalue-function-dax&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Nov 2022 14:47:19 GMT</pubDate>
    <dc:creator>djurecic</dc:creator>
    <dc:date>2022-11-29T14:47:19Z</dc:date>
    <item>
      <title>Compliance check of 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compliance-check-of-2-tables/m-p/2936122#M96771</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 tables A and B without direct relation.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Table A there are 3000 Names and 2000 names in Table B&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to compare the name of 2 tables&amp;nbsp;to check the compliance of these 2 tables :&lt;/P&gt;&lt;P&gt;- number of same names (Card view)&lt;/P&gt;&lt;P&gt;- number of different names&amp;nbsp;(Card view)&lt;/P&gt;&lt;P&gt;and a list (table view) of these same and different names.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please advise?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;&lt;P&gt;Tg&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 14:30:56 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compliance-check-of-2-tables/m-p/2936122#M96771</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-29T14:30:56Z</dc:date>
    </item>
    <item>
      <title>Re: Compliance check of 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compliance-check-of-2-tables/m-p/2936192#M96781</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;You can use the LOOKUPVALUE function to compare fields from tables that are not related.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://learn.microsoft.com/en-us/dax/lookupvalue-function-dax" target="_blank"&gt;https://learn.microsoft.com/en-us/dax/lookupvalue-function-dax&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Nov 2022 14:47:19 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compliance-check-of-2-tables/m-p/2936192#M96781</guid>
      <dc:creator>djurecic</dc:creator>
      <dc:date>2022-11-29T14:47:19Z</dc:date>
    </item>
    <item>
      <title>Re: Compliance check of 2 tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compliance-check-of-2-tables/m-p/2938157#M96930</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suggest you to create a DimName table with all distinct names and then do calculation based on this table.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;DimName = 
VAR _UNION = UNION(VALUES('Table A'[Name]),VALUES('Table B'[Name]))
RETURN
SUMMARIZE(_UNION,[Name])&lt;/LI-CODE&gt;
&lt;P&gt;My Sample is as below.&lt;/P&gt;
&lt;P&gt;Table A:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Table B:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Measure:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;number of same names =
CALCULATE (
    COUNT ( DimName[Name] ),
    FILTER (
        DimName,
        AND (
            DimName[Name] IN VALUES ( 'Table A'[Name] ),
            DimName[Name] IN VALUES ( 'Table B'[Name] )
        )
    )
)&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;number of different names = CALCULATE(COUNT(DimName[Name])) - [number of same names]&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;Filter Same list =
IF (
    AND (
        SELECTEDVALUE ( DimName[Name] ) IN VALUES ( 'Table A'[Name] ),
        SELECTEDVALUE ( DimName[Name] ) IN VALUES ( 'Table B'[Name] )
    ),
    1,
    0
)&lt;/LI-CODE&gt;
&lt;P&gt;Result is as below.&lt;/P&gt;
&lt;P&gt;Add [Filter Same list] into Same Name list (visual level filter) and set it to show items when value = 1.&lt;/P&gt;
&lt;P&gt;Add [Filter Same list] into Different Name list&amp;nbsp;(visual level filter) and set it to show items when value = 2.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;BR /&gt;Rico Zhou&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 08:36:17 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compliance-check-of-2-tables/m-p/2938157#M96930</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-11-30T08:36:17Z</dc:date>
    </item>
  </channel>
</rss>

