<?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 Compare the string and find the difference in Qliksense in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Compare-the-string-and-find-the-difference-in-Qliksense/m-p/1874974#M72152</link>
    <description>&lt;P&gt;HI,&lt;/P&gt;
&lt;P&gt;There's a scenario where we have to compare the string and find the common string value grouped by ID.&lt;/P&gt;
&lt;P&gt;Input&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abhijith28_0-1640349289069.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/69194iAF1DCA81643A7E4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abhijith28_0-1640349289069.png" alt="abhijith28_0-1640349289069.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Expected Output&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abhijith28_1-1640349324291.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/69195i3ED4EDF5C80EDF4B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abhijith28_1-1640349324291.png" alt="abhijith28_1-1640349324291.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically we have to create a column to find the common string when grouped by ID and the second column would be other part of the Name.&lt;/P&gt;
&lt;P&gt;Tried previous, concat, subfield and peek functions but couldn't find the solution.&lt;/P&gt;
&lt;P&gt;Exceptions: We should not consider delimiter&amp;nbsp; &amp;amp; subfield option to separate out the values&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 Dec 2021 12:42:16 GMT</pubDate>
    <dc:creator>abhijith28</dc:creator>
    <dc:date>2021-12-24T12:42:16Z</dc:date>
    <item>
      <title>Compare the string and find the difference in Qliksense</title>
      <link>https://community.qlik.com/t5/App-Development/Compare-the-string-and-find-the-difference-in-Qliksense/m-p/1874974#M72152</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;
&lt;P&gt;There's a scenario where we have to compare the string and find the common string value grouped by ID.&lt;/P&gt;
&lt;P&gt;Input&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abhijith28_0-1640349289069.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/69194iAF1DCA81643A7E4F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abhijith28_0-1640349289069.png" alt="abhijith28_0-1640349289069.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Expected Output&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="abhijith28_1-1640349324291.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/69195i3ED4EDF5C80EDF4B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="abhijith28_1-1640349324291.png" alt="abhijith28_1-1640349324291.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Basically we have to create a column to find the common string when grouped by ID and the second column would be other part of the Name.&lt;/P&gt;
&lt;P&gt;Tried previous, concat, subfield and peek functions but couldn't find the solution.&lt;/P&gt;
&lt;P&gt;Exceptions: We should not consider delimiter&amp;nbsp; &amp;amp; subfield option to separate out the values&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Dec 2021 12:42:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Compare-the-string-and-find-the-difference-in-Qliksense/m-p/1874974#M72152</guid>
      <dc:creator>abhijith28</dc:creator>
      <dc:date>2021-12-24T12:42:16Z</dc:date>
    </item>
    <item>
      <title>Re: Compare the string and find the difference in Qliksense</title>
      <link>https://community.qlik.com/t5/App-Development/Compare-the-string-and-find-the-difference-in-Qliksense/m-p/1875011#M72159</link>
      <description>&lt;P&gt;Can we assume the common string is always the beginning of the string? Or can the match be anywhere in the string?&lt;/P&gt;
&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Fri, 24 Dec 2021 15:56:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Compare-the-string-and-find-the-difference-in-Qliksense/m-p/1875011#M72159</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2021-12-24T15:56:10Z</dc:date>
    </item>
    <item>
      <title>Re: Compare the string and find the difference in Qliksense</title>
      <link>https://community.qlik.com/t5/App-Development/Compare-the-string-and-find-the-difference-in-Qliksense/m-p/1875168#M72167</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6148"&gt;@rwunderlich&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That's Correct the common string will always starts from the beginning.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Dec 2021 06:32:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Compare-the-string-and-find-the-difference-in-Qliksense/m-p/1875168#M72167</guid>
      <dc:creator>abhijith28</dc:creator>
      <dc:date>2021-12-27T06:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: Compare the string and find the difference in Qliksense</title>
      <link>https://community.qlik.com/t5/App-Development/Compare-the-string-and-find-the-difference-in-Qliksense/m-p/1875379#M72179</link>
      <description>&lt;P&gt;Maybe one solution might be:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MarcoWedel_0-1640645778278.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/69257i2CF5F0BF0D83C433/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MarcoWedel_0-1640645778278.png" alt="MarcoWedel_0-1640645778278.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;table1:
LOAD * Inline [
Name,  ID
Abcd,  1
Abce,  1
Abcef, 1
Bcde,  2
c,     3
cd,    3
cde,   3
cdef,  3
defghi,4
defghj,4
defdhi,4
efgh,  5
fghi,  5
ghij,  5
];

table2:
LOAD *,
     Mid(Name,IterNo(),1)	as Char,
     IterNo()				as Pos
Resident table1
While IterNo()&amp;lt;=Len(Name);
Join
LOAD ID,
     Count(Name) as NameNum
Resident table1
Group By ID;

Join (table1)
LOAD ID,
     Index(Concat(CharEqual,'',Pos)&amp;amp;'0','0')-1 as CommonChars
Group By ID;
LOAD ID,
     Pos,
     fabs(Count(DISTINCT Char)=1 and Count(Char)=Only(NameNum)) as CharEqual
Resident table2
Group By ID, Pos;

DROP Table table2;

Join (table1)
LOAD ID,
     Name,
     Left(Name,CommonChars)		as Expected,
     Mid(Name,CommonChars+1)	as Expected1
Resident table1;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;hope this helps&lt;/P&gt;
&lt;P&gt;Marco&lt;/P&gt;</description>
      <pubDate>Mon, 27 Dec 2021 22:58:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Compare-the-string-and-find-the-difference-in-Qliksense/m-p/1875379#M72179</guid>
      <dc:creator>MarcoWedel</dc:creator>
      <dc:date>2021-12-27T22:58:17Z</dc:date>
    </item>
    <item>
      <title>Re: Compare the string and find the difference in Qliksense</title>
      <link>https://community.qlik.com/t5/App-Development/Compare-the-string-and-find-the-difference-in-Qliksense/m-p/1875755#M72196</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/675"&gt;@MarcoWedel&lt;/a&gt;&amp;nbsp; Thanks for your time:)&lt;/P&gt;
&lt;P&gt;Your solution is perfect.&lt;/P&gt;</description>
      <pubDate>Wed, 29 Dec 2021 09:08:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Compare-the-string-and-find-the-difference-in-Qliksense/m-p/1875755#M72196</guid>
      <dc:creator>abhijith28</dc:creator>
      <dc:date>2021-12-29T09:08:45Z</dc:date>
    </item>
  </channel>
</rss>

