<?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: How to detect the percentage of equal text in my column across rows in DAX Commands and Tips</title>
    <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3235462#M118904</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="559254" data-lia-user-login="asofiacgraca" class="lia-mention lia-mention-user"&gt;asofiacgraca&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Actually your requirement seems to be much simplier than best match pattern. Would you share some sample data or sample file to work with?&lt;/P&gt;</description>
    <pubDate>Mon, 15 May 2023 10:43:01 GMT</pubDate>
    <dc:creator>tamerj1</dc:creator>
    <dc:date>2023-05-15T10:43:01Z</dc:date>
    <item>
      <title>How to detect the percentage of equal text in my column across rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3231338#M118583</link>
      <description>&lt;P&gt;Hey, I am having some troubles here. Can someone help me, please?&lt;/P&gt;&lt;P&gt;I have some purchase orders and the description of each order. I am trying to figure out if there are purchase orders with like 80% match of their description.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Help, please &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2023 16:39:33 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3231338#M118583</guid>
      <dc:creator>asofiacgraca</dc:creator>
      <dc:date>2023-05-11T16:39:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect the percentage of equal text in my column across rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3234832#M118859</link>
      <description>&lt;P&gt;Hi ,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="559254" data-lia-user-login="asofiacgraca" class="lia-mention lia-mention-user"&gt;asofiacgraca&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;According to your description, you want to&amp;nbsp;&lt;SPAN&gt;detect the percentage of equal text in my column across rows.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For your needs, in Power Query we mainly perform data transformation, if your text is a statement, then it may be difficult to directly use Power Query to calculate text similarity.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For comparing two separate words, we can use Text.ToList() to get a list of corresponding texts, then List.Intersect() to get the same string, and then use division to calculate text similarity.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For more information, you can refer to :&lt;BR /&gt;&lt;A href="https://community.powerbi.com/t5/Desktop/Compare-two-strings-for-similarity/m-p/290062" target="_blank"&gt;Solved: Compare two strings for similarity - Microsoft Power BI Community&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For statement comparison, you can try to find a third-party API, and then use Web.Contents to call the API in Power Query to get the corresponding text similarity.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;For more information, you can refer to :&lt;BR /&gt;&lt;A href="https://learn.microsoft.com/en-us/powerquery-m/web-contents" target="_blank"&gt;Web.Contents - PowerQuery M | Microsoft Learn&lt;/A&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;Aniya Zhang&lt;/P&gt;
&lt;P&gt;If this post&amp;nbsp;&lt;STRONG&gt;helps&lt;/STRONG&gt;, then please consider&amp;nbsp;&lt;STRONG&gt;&lt;EM&gt;Accept&lt;/EM&gt;&lt;/STRONG&gt;&lt;EM&gt; it as the solution&lt;/EM&gt;&amp;nbsp;to help the other members find it more quickly&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 05:46:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3234832#M118859</guid>
      <dc:creator>v-yueyunzh-msft</dc:creator>
      <dc:date>2023-05-15T05:46:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect the percentage of equal text in my column across rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3234901#M118862</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="559254" data-lia-user-login="asofiacgraca" class="lia-mention lia-mention-user"&gt;asofiacgraca&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Attached is an example of best match calcuation using DAX.&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 06:30:43 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3234901#M118862</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-15T06:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect the percentage of equal text in my column across rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3235438#M118900</link>
      <description>&lt;P&gt;Hey&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;Thank you for responding to my question. I am having some troubles tho. The table Standard is supposed to be created on VAR T3, right? I can't do that on my data, it only lets me use existing data on the first parameter. Can you help me?&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 10:22:30 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3235438#M118900</guid>
      <dc:creator>asofiacgraca</dc:creator>
      <dc:date>2023-05-15T10:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect the percentage of equal text in my column across rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3235441#M118901</link>
      <description>&lt;P&gt;Hey&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="433015" data-lia-user-login="v-yueyunzh-msft" class="lia-mention lia-mention-user"&gt;v-yueyunzh-msft&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your answer!&lt;BR /&gt;Yes, i am trying for the statement comparision &lt;span class="lia-unicode-emoji" title=":confused_face:"&gt;😕&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Best regards&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 10:24:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3235441#M118901</guid>
      <dc:creator>asofiacgraca</dc:creator>
      <dc:date>2023-05-15T10:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect the percentage of equal text in my column across rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3235444#M118902</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="559254" data-lia-user-login="asofiacgraca" class="lia-mention lia-mention-user"&gt;asofiacgraca&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please provide some screenshots for better understanding.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 10:30:42 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3235444#M118902</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-15T10:30:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect the percentage of equal text in my column across rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3235456#M118903</link>
      <description>&lt;P&gt;Let's suppose I have this table with this data:&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;If I try to add your code in a calculated collumn on my table i have this error because the paremeter isnt the right type (i only have one table - table 1).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 10:38:52 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3235456#M118903</guid>
      <dc:creator>asofiacgraca</dc:creator>
      <dc:date>2023-05-15T10:38:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect the percentage of equal text in my column across rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3235462#M118904</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="559254" data-lia-user-login="asofiacgraca" class="lia-mention lia-mention-user"&gt;asofiacgraca&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Actually your requirement seems to be much simplier than best match pattern. Would you share some sample data or sample file to work with?&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 10:43:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3235462#M118904</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-15T10:43:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect the percentage of equal text in my column across rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3235488#M118909</link>
      <description>&lt;P&gt;How can i attach a file here? having troubles doing so&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 10:54:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3235488#M118909</guid>
      <dc:creator>asofiacgraca</dc:creator>
      <dc:date>2023-05-15T10:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect the percentage of equal text in my column across rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3235502#M118910</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="559254" data-lia-user-login="asofiacgraca" class="lia-mention lia-mention-user"&gt;asofiacgraca&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Please try this version. I guess it matches your requirement.&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;Dealer (Standard) = 
VAR String1 = Table1[Dealer]
VAR Items1 = SUBSTITUTE ( String1, " ", "|" )
VAR Length1 = COALESCE ( PATHLENGTH ( Items1 ), 1 )
VAR T1 = GENERATESERIES ( 1, Length1, 1 )
VAR T2 = SELECTCOLUMNS ( T1, "@Item", PATHITEM ( Items1, [Value] ) )
VAR T3 = 
    ADDCOLUMNS ( 
        VALUES ( Table1[Dealer] ),
        "@%Match",
        VAR String2 = Table1[Dealer]
        VAR Items2 = SUBSTITUTE ( String2, " ", "|" )
        VAR Length2 = COALESCE ( PATHLENGTH ( Items2 ), 1 )
        VAR T4 = GENERATESERIES ( 1, Length2, 1 )
        VAR T5 = SELECTCOLUMNS ( T4, "@Item", PATHITEM ( Items2, [Value] ) )
        VAR T6 = INTERSECT ( T5, T2 )
        RETURN
            DIVIDE ( COUNTROWS ( T6 ), COUNTROWS ( T5 ) )
    )
VAR T7 = FILTER ( T3, [@%Match] &amp;gt;= 0.8 )
RETURN
    COUNTROWS ( T7 )&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 15 May 2023 11:04:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3235502#M118910</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-15T11:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect the percentage of equal text in my column across rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3237218#M119023</link>
      <description>&lt;P&gt;Hey&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;That seem to be working on my data set! Many thanks&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;&lt;P&gt;However, on my real data as it it a large set it's not running, do you know how to accelarate the process?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 08:03:01 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3237218#M119023</guid>
      <dc:creator>asofiacgraca</dc:creator>
      <dc:date>2023-05-16T08:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to detect the percentage of equal text in my column across rows</title>
      <link>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3237239#M119026</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="559254" data-lia-user-login="asofiacgraca" class="lia-mention lia-mention-user"&gt;asofiacgraca&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes it is a pretty heavy calculation and won't work for big data. Not sure if can improved as DAX is not designed to perform such type of calculations.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 May 2023 08:13:25 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-to-detect-the-percentage-of-equal-text-in-my-column-across/m-p/3237239#M119026</guid>
      <dc:creator>tamerj1</dc:creator>
      <dc:date>2023-05-16T08:13:25Z</dc:date>
    </item>
  </channel>
</rss>

