<?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: Compare different tables in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-different-tables/m-p/3138194#M111936</link>
    <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="526771" data-lia-user-login="ismael92" class="lia-mention lia-mention-user"&gt;ismael92&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;Table1:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Table2:&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;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag =
var _1=
SUMMARIZE(
    'Table1','Table1'[ID],'Table1'[status],
    "Table2match",MAXX(
        FILTER(ALL(Table2),'Table2'[ID]=EARLIER('Table1'[ID])),[status]))
var _2=
ADDCOLUMNS(
    _1,"Flag",
    IF(
        [status]=[Table2match],"Match","Error"))
return
MAXX(
    FILTER(
        ALL('True'),
        'True'[ID]=MAX('Table2'[ID])),'True'[Flag])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Result:&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;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
    <pubDate>Fri, 17 Mar 2023 08:27:14 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2023-03-17T08:27:14Z</dc:date>
    <item>
      <title>Compare different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-different-tables/m-p/3121459#M110707</link>
      <description>&lt;P&gt;Good afternoon,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to compare two different tables with several columns:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table1 with 20 columns&lt;/P&gt;&lt;P&gt;Table2 with 20 columns&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Both tables have a column with the same identificator.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried to use the below data structure:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Match =&lt;BR /&gt;var _table1 = SELECTEDVALUE('Table1'[Status1])&lt;BR /&gt;var _table2 = SELECTEDVALUE('Table2'[Status2])&lt;BR /&gt;return&lt;BR /&gt;IF(_table1=_table2, "Match", "Error")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It always retorn "Match" as comparation value,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Someone knows why this is not working properly?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 12:43:53 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-different-tables/m-p/3121459#M110707</guid>
      <dc:creator>ismael92</dc:creator>
      <dc:date>2023-03-09T12:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Compare different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-different-tables/m-p/3121526#M110715</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="526771" data-lia-user-login="ismael92" class="lia-mention lia-mention-user"&gt;ismael92&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;How does your visual look like? Any other table(s) involved? Match is a measure, right?&lt;/P&gt;</description>
      <pubDate>Thu, 09 Mar 2023 13:06:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-different-tables/m-p/3121526#M110715</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-03-09T13:06:29Z</dc:date>
    </item>
    <item>
      <title>Re: Compare different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-different-tables/m-p/3138194#M111936</link>
      <description>&lt;P&gt;Hi&amp;nbsp; &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="526771" data-lia-user-login="ismael92" class="lia-mention lia-mention-user"&gt;ismael92&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I created some data:&lt;/P&gt;
&lt;P&gt;Table1:&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Table2:&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;Here are the steps you can follow：&lt;/P&gt;
&lt;P&gt;1. Create measure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Flag =
var _1=
SUMMARIZE(
    'Table1','Table1'[ID],'Table1'[status],
    "Table2match",MAXX(
        FILTER(ALL(Table2),'Table2'[ID]=EARLIER('Table1'[ID])),[status]))
var _2=
ADDCOLUMNS(
    _1,"Flag",
    IF(
        [status]=[Table2match],"Match","Error"))
return
MAXX(
    FILTER(
        ALL('True'),
        'True'[ID]=MAX('Table2'[ID])),'True'[Flag])&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2. Result:&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;/P&gt;
&lt;P&gt;Liu Yang&lt;/P&gt;
&lt;P&gt;If this post &lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider &lt;EM&gt;Accept it as the solution&lt;/EM&gt; to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 08:27:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-different-tables/m-p/3138194#M111936</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-17T08:27:14Z</dc:date>
    </item>
    <item>
      <title>Re: Compare different tables</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-different-tables/m-p/3138325#M111939</link>
      <description>&lt;P&gt;Create Calculate Column&lt;BR /&gt;Comp column = If(Related(Table1[Status]),=Table2[Status],"Match","Error")&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 09:20:32 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Compare-different-tables/m-p/3138325#M111939</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2023-03-17T09:20:32Z</dc:date>
    </item>
  </channel>
</rss>

