<?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: Check if a value or it`s substrings in one table have an equivalent in another table in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2815494#M89265</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Indeed, it was working. My Binaries where presenting an error. I did correct them, and then it worked perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for the help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 04 Oct 2022 01:03:43 GMT</pubDate>
    <dc:creator>ardisson</dc:creator>
    <dc:date>2022-10-04T01:03:43Z</dc:date>
    <item>
      <title>Check if a value or it`s substrings in one table have an equivalent in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2804548#M88389</link>
      <description>&lt;P&gt;Hello guys,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm stuck with the task about to be explained, and really hope you guys can help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 2 tables, A and B, the first of them has a column W with binary(base 2) values (around 100 lines), and the second has a column Z with around 10k binary(base 2) values. I have to check if each value from table A or it`s substrings has an equivalent in the column in table B.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As an example, considering that the first value from column W table A is "110001011101100000000001", i have to check if this 24 digit binary has an exact equivalent in column Z in table B, and in that case, get the value in column X from table B and return it to another column in table A. If not, I have to proceed checking if the first 23 digit's substring has the equivalent, getting the Column X value if true, proceding to check the first 22 digits if not, and so on until I get an exact match or until only 12 digits remain.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I really apreciate any help you guys could give me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 01:36:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2804548#M88389</guid>
      <dc:creator>ardisson</dc:creator>
      <dc:date>2022-09-29T01:36:12Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a value or it`s substrings in one table have an equivalent in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2804768#M88407</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="449020" data-lia-user-login="ardisson" class="lia-mention lia-mention-user"&gt;ardisson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;please present a sample data along with the expected results&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 03:05:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2804768#M88407</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-29T03:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a value or it`s substrings in one table have an equivalent in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2805980#M88499</link>
      <description>&lt;P&gt;Hi &lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;, thank you for the reply. Let me see if I can illustrate it a little:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table A&lt;BR /&gt;Binary&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Codes&lt;BR /&gt;110100100001010100110100&lt;BR /&gt;111100010010110101&lt;BR /&gt;101100110100110000110&lt;BR /&gt;110100100001010100110100&lt;BR /&gt;111100010010110101&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table B&lt;BR /&gt;Binary&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Codes&lt;BR /&gt;110100100001010100110&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ABC&lt;BR /&gt;1011001101001100001&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DEF&lt;BR /&gt;1111000100101101&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GHI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table A (Result)&lt;/P&gt;&lt;P&gt;Binary&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Codes&lt;/P&gt;&lt;P&gt;110100100001010100110100&amp;nbsp; &amp;nbsp; &amp;nbsp; ABC&lt;/P&gt;&lt;P&gt;111100010010110101&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GHI&lt;/P&gt;&lt;P&gt;101100110100110000110&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; DEF&lt;/P&gt;&lt;P&gt;110100100001010100110100&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp;ABC&lt;/P&gt;&lt;P&gt;111100010010110101&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; GHI&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see, I have to bring to Table A the unique Codes from Table B by checking if each Binary from Table A or their substrings are equal to any Binary in Table B.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the example above, the first item in Binary column from Table A, 110100100001010100110100, doesn't have a equivalent in Binary in Table B, so i have to check it's substring (something like LEFT(TableA[Binary], Len(TableA[Binary]) - 1)) to see if I get an equivalent in Table B. If not, I must try the next substring LEFT(TableA[Binary], Len(TableA[Binary]) - 2), and so on, until I find an equivalent in Table B (in this case, 110100100001010100110, or LEFT(TableA[Binary], Len(TableA[Binary]) - 3)), then bring to Codes column in Table A the Codes value (ABC) of the equivalent in Table B.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 10:17:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2805980#M88499</guid>
      <dc:creator>ardisson</dc:creator>
      <dc:date>2022-09-29T10:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a value or it`s substrings in one table have an equivalent in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2806033#M88501</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="449020" data-lia-user-login="ardisson" class="lia-mention lia-mention-user"&gt;ardisson&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please refer to attached file with the solution&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Code = 
MAXX (
    FILTER (
        TableB, 
        CONTAINSSTRING ( TableA[Binary], TableB[Binary] )
    ),
    TableB[Codes]
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 29 Sep 2022 10:29:07 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2806033#M88501</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-29T10:29:07Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a value or it`s substrings in one table have an equivalent in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2806532#M88563</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried the solution you presented, and at first it seemd it would work, however, I found a problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The CONTAINSSTRING check a value along the entire body of another value, and in my case, a need this checking to start exactly at position 0 of the compared value. As an example 110110110011001100 has binary 110011001100 (starting at position 6) in it, but it doesn`t start at position 0. So it would return a false positive.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my case, the binary value to be compared from table B must always start the comparison at position 0 of the value from table A, and if it didn`t find anything, it must check if the substring of the binary from table A (LEN[X] - 1) is equal to any binary in table B, also starting at position 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, 110110110011001100 from table A must not bring the Code value from the binary 110011001100 in table B, because 110110110011001100 is not equal to 110011001100, and 11011011001100110 neither, and 1101101100110011 neither, and so on until only 12 digits are left, As a result, It would not return any value.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it would bring a Code value from&lt;BR /&gt;110110110011 in Table B, because 110110110011 is equal to LEFT(110110110011001100, LEN(110110110011001100) - 6), and has 12 digits or more.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If DAX had something like STARTSWITH, I could replace the CONTAINSSTRING with it...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Have you any idea how could I manage to get that?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 13:18:06 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2806532#M88563</guid>
      <dc:creator>ardisson</dc:creator>
      <dc:date>2022-09-29T13:18:06Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a value or it`s substrings in one table have an equivalent in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2806560#M88569</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="449020" data-lia-user-login="ardisson" class="lia-mention lia-mention-user"&gt;ardisson&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm not on my PC so I did't test. Please try&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Code =
MAXX (
    FILTER (
        TableB,
        LEFT ( TableA[Binary], LEN ( TableB[Binary] ) ) = TableB[Binary]
    ),
    TableB[Codes]
)&lt;/LI-CODE&gt;</description>
      <pubDate>Thu, 29 Sep 2022 13:31:08 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2806560#M88569</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-29T13:31:08Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a value or it`s substrings in one table have an equivalent in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2806594#M88575</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I`ve tried that before. For some reason, it only brings me the same value from table B for all the lines in table A, which I know is not correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 13:47:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2806594#M88575</guid>
      <dc:creator>ardisson</dc:creator>
      <dc:date>2022-09-29T13:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a value or it`s substrings in one table have an equivalent in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2806835#M88599</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="449020" data-lia-user-login="ardisson" class="lia-mention lia-mention-user"&gt;ardisson&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Seems to be working in the sample file&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Sep 2022 15:57:10 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2806835#M88599</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2022-09-29T15:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Check if a value or it`s substrings in one table have an equivalent in another table</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2815494#M89265</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="317289" data-lia-user-login="tamerj1" class="lia-mention lia-mention-user"&gt;tamerj1&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Indeed, it was working. My Binaries where presenting an error. I did correct them, and then it worked perfectly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you so much for the help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Oct 2022 01:03:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/Check-if-a-value-or-it-s-substrings-in-one-table-have-an/m-p/2815494#M89265</guid>
      <dc:creator>ardisson</dc:creator>
      <dc:date>2022-10-04T01:03:43Z</dc:date>
    </item>
  </channel>
</rss>

