<?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: Linking two tables on partial data (like a WIldMatch) in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Linking-two-tables-on-partial-data-like-a-WIldMatch/m-p/1670757#M743397</link>
    <description>&lt;P&gt;I'm not sure that I comprehend it right what has changed / needs to be adjusted to get now the wanted results. I assume that you hadn't a logic-mistake within your if-loop so that the else-part would returned respectively the second condition could never be true because the first condition is always true.&lt;/P&gt;&lt;P&gt;Therefore I could imagine that it is caused from the mapping - and a mapping worked like a VLOOKUP in Excel and returned always the value from the first match regardless how many matches there are.&lt;/P&gt;&lt;P&gt;Depending on the kind of the data an appropriate ordering might be useful (by dates or id's from which only the latest should be taken or something similar). Another approach is to use an aggregation and to concat() all possible return-values - and afterwards you used an additionally subfield-logic to pick the right part from it. I use this logic with applymap() quite often to avoid multiple mappings. In your case with mapsubstring() it's probably not so easy to implement.&lt;/P&gt;&lt;P&gt;A further way to bypass this kind of challenge is to extend the lookup-value so that each value is definitely unique and then to add this extension also within the mapping-query - maybe with some if-loops. Also the use of several mappings might be helpful - just pulling all matching-values and an afterwards-logic choosed from them the right one. I think I would rather start with my last suggestion to see if it worked and if you could improve the elegance and performance later.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
    <pubDate>Thu, 30 Jan 2020 08:06:41 GMT</pubDate>
    <dc:creator>marcus_sommer</dc:creator>
    <dc:date>2020-01-30T08:06:41Z</dc:date>
    <item>
      <title>Linking two tables on partial data (like a WIldMatch)</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-two-tables-on-partial-data-like-a-WIldMatch/m-p/1556037#M743394</link>
      <description>&lt;P&gt;I have two sets of data where one set has a definitive piece of information and the other data set has a freeform field that I am trying&amp;nbsp; to "search" through and match if that definitive piece exists in that freeform field.&amp;nbsp; Normally I'd have two fields in my load sequence (table A's piece named "datapiece" and table B's piece also named "datapiece") and then QV links the two tables on that field. That works great if there is a perfect patch.&lt;/P&gt;&lt;P&gt;How can I link two tables on a partial match? I can't use a Mapping, as that would only pull in 1 answer/match.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table A:&lt;/P&gt;&lt;P&gt;Field = "path" and is something like "folder1/subfolder7"&lt;/P&gt;&lt;P&gt;SystemName&amp;nbsp;&amp;nbsp;&amp;nbsp; Path&lt;/P&gt;&lt;P&gt;System1&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;folder1/subfolder2&lt;/P&gt;&lt;P&gt;System2&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; folder1/subfolder7&lt;/P&gt;&lt;P&gt;System3&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; folder2/subfolder2&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table B:&amp;nbsp;&amp;nbsp; where that "path" might exist somewhere inside the "mount" field&lt;/P&gt;&lt;P&gt;Server&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;IP&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Mount&lt;/P&gt;&lt;P&gt;ServerA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.10.10.10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "/etc dev nosuid filerA:/vol/folder1/subfolder7 /mnt"&lt;/P&gt;&lt;P&gt;ServerB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11.11.11.11&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "filerB:/vol/folder1/subfolder7 /var"&lt;/P&gt;&lt;P&gt;ServerC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12.12.12.12&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "filerM:/vol/folder1/subfolder2 /www nosuid RW RO"&lt;/P&gt;&lt;P&gt;ServerD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;9.9.9.9&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; "Local RO /etc/ora commonname:/vol/folder1/subfolder2 /www RW"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So in theory I could link the tables and come up with something like this since ServerA and ServerB both have the "folder1/subfolder7" in there and then ServerC and ServerD both have the "folder1/subfolder2" in there:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;System&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Path&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;&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; Server&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IP&lt;/P&gt;&lt;P&gt;System1&amp;nbsp;&amp;nbsp;&amp;nbsp;folder1/subfolder2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12.12.12.12&amp;nbsp;&lt;/P&gt;&lt;P&gt;System1&amp;nbsp;&amp;nbsp;&amp;nbsp;folder1/subfolder2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerD&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;9.9.9.9&amp;nbsp;&lt;/P&gt;&lt;P&gt;System2&amp;nbsp;&amp;nbsp;&amp;nbsp;folder1/subfolder7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10.10.10.10&lt;/P&gt;&lt;P&gt;System2&amp;nbsp;&amp;nbsp;&amp;nbsp;folder1/subfolder7&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ServerB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 11.11.11.11&lt;/P&gt;&lt;P&gt;System3&amp;nbsp;&amp;nbsp;&amp;nbsp;folder2/subfolder2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; null&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; null&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-two-tables-on-partial-data-like-a-WIldMatch/m-p/1556037#M743394</guid>
      <dc:creator>dawgfather</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Linking two tables on partial data (like a WIldMatch)</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-two-tables-on-partial-data-like-a-WIldMatch/m-p/1556423#M743395</link>
      <description>&lt;P&gt;You could use a mapping for it, for example:&lt;/P&gt;&lt;P&gt;map: mapping load Path, chr(1) &amp;amp; SystemName &amp;amp; chr(2) from TableA;&lt;/P&gt;&lt;P&gt;TableB:&lt;BR /&gt;load *, textbetween(mapsubstring('map', Mount), chr(1), chr(2)) as SystemName from TableB;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2019 10:06:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-two-tables-on-partial-data-like-a-WIldMatch/m-p/1556423#M743395</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2019-03-14T10:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: Linking two tables on partial data (like a WIldMatch)</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-two-tables-on-partial-data-like-a-WIldMatch/m-p/1670597#M743396</link>
      <description>&lt;P&gt;Marcus - this worked like a charm for the past 9 months...now I have an interesting thing happening.&lt;/P&gt;&lt;P&gt;We added a second/different set of systems so that "&lt;SPAN&gt;SystemName&amp;nbsp;&lt;/SPAN&gt;" is something I have to create with an IF statement...essentially IF systemtype=1 THEN foldertype1/subfolder OTHERWISE foldertype2/subfolder...as SystemName. And I get the proper data in this new SystemName field.&lt;/P&gt;&lt;P&gt;But when I go to put that SystemName field inside the "&lt;SPAN&gt;map: mapping load Path, chr(1) &amp;amp; SystemName &amp;amp; chr(2) from TableA;&lt;/SPAN&gt;"...it only works for the first part of the IF statement. If my IF statement starts with Type=1 (IF systemtype=1, then...) then my Type 1 things match but the Type 2 don't. If I flip the IF statement to be "IF systemtype=2, THEN&amp;nbsp; foldertype2/subfolder OTHERWISE foldertype1/subfolder...as SystemName" then my Type 2 stuff works but not my Type 1.&lt;/P&gt;&lt;P&gt;I tried to create this SystemName in a SQL statement as part of the main load thinking I could do away with the IF statement using a CASE in the SQL query...but I get the same thing there...if Type 1 is first in my CASE statement, I get type 1 matches but no type 2. If Type 2 is first in my CASE statement, my type 2 stuff matches but type 1 does not.&lt;/P&gt;&lt;P&gt;Really strange and it makes no sense to me because the data in that SystemName field is right...I can copy that cell and then search for *SystemName* (copied) in that Mount field (second part of the process you answered) and it finds the matches.&lt;/P&gt;&lt;P&gt;Got any ideas?&lt;/P&gt;</description>
      <pubDate>Wed, 29 Jan 2020 16:54:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-two-tables-on-partial-data-like-a-WIldMatch/m-p/1670597#M743396</guid>
      <dc:creator>dawgfather</dc:creator>
      <dc:date>2020-01-29T16:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Linking two tables on partial data (like a WIldMatch)</title>
      <link>https://community.qlik.com/t5/QlikView/Linking-two-tables-on-partial-data-like-a-WIldMatch/m-p/1670757#M743397</link>
      <description>&lt;P&gt;I'm not sure that I comprehend it right what has changed / needs to be adjusted to get now the wanted results. I assume that you hadn't a logic-mistake within your if-loop so that the else-part would returned respectively the second condition could never be true because the first condition is always true.&lt;/P&gt;&lt;P&gt;Therefore I could imagine that it is caused from the mapping - and a mapping worked like a VLOOKUP in Excel and returned always the value from the first match regardless how many matches there are.&lt;/P&gt;&lt;P&gt;Depending on the kind of the data an appropriate ordering might be useful (by dates or id's from which only the latest should be taken or something similar). Another approach is to use an aggregation and to concat() all possible return-values - and afterwards you used an additionally subfield-logic to pick the right part from it. I use this logic with applymap() quite often to avoid multiple mappings. In your case with mapsubstring() it's probably not so easy to implement.&lt;/P&gt;&lt;P&gt;A further way to bypass this kind of challenge is to extend the lookup-value so that each value is definitely unique and then to add this extension also within the mapping-query - maybe with some if-loops. Also the use of several mappings might be helpful - just pulling all matching-values and an afterwards-logic choosed from them the right one. I think I would rather start with my last suggestion to see if it worked and if you could improve the elegance and performance later.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Thu, 30 Jan 2020 08:06:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Linking-two-tables-on-partial-data-like-a-WIldMatch/m-p/1670757#M743397</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2020-01-30T08:06:41Z</dc:date>
    </item>
  </channel>
</rss>

