<?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 Two different variables inside a wildmap in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Two-different-variables-inside-a-wildmap/m-p/1354355#M415835</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the following script to creat a wildmap iteration inside a dimension that list description of other lines inside the table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wildmap:&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;rowno() as Label;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Key, Label1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;SET vMapKey=; // Initialize variable&lt;/P&gt;&lt;P&gt;SET vMapLabel=; // Initialize variable&lt;/P&gt;&lt;P&gt;SET comma=; // Initialize variable&lt;/P&gt;&lt;P&gt;SET esc = chr(01); // The character we will use to escape quotes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Loop through the rows of the wildmatch table to build the expression string,&lt;/P&gt;&lt;P&gt;FOR i = 0 to NoOfRows('wildmap')-1&lt;/P&gt;&lt;P&gt;LET vMapKey = vMapKey &amp;amp; comma &amp;amp; $(esc) &amp;amp; peek('Key', i, 'wildmap') &amp;amp; $(esc);&lt;/P&gt;&lt;P&gt;LET vMapLabel = vMapLabel &amp;amp; comma &amp;amp; $(esc) &amp;amp; peek('Label1', i, 'wildmap') &amp;amp; $(esc);&lt;/P&gt;&lt;P&gt;SET comma = ','; // Next time through the loop, insert a comma&lt;/P&gt;&lt;P&gt;NEXT i&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET i=; // Drop unneeded variable&lt;/P&gt;&lt;P&gt;SET comma=; // Drop unneeded variable&lt;/P&gt;&lt;P&gt;// For this example, I'm going to keep the wildmatch table for illustrative purposes on the Sheet.&lt;/P&gt;&lt;P&gt;//DROP TABLE wildmap;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Drop the wildmatch table -- don't need it anymore&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Combine the key and label values, replacing the $(esc) char with real quotes, to build the expression&lt;/P&gt;&lt;P&gt;LET vMapExpr = replace('pick(wildMatch($1,$(vMapKey)), $(vMapLabel))', $(esc), chr(39));&lt;/P&gt;&lt;P&gt;SET vMapKey=; // Drop unneeded variable&lt;/P&gt;&lt;P&gt;SET vMapLabel=; // Drop unneeded variable&lt;/P&gt;&lt;P&gt;SET esc=; // Drop unneeded variable&lt;/P&gt;&lt;P&gt;//exit script;&lt;/P&gt;&lt;P&gt;t:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(BANCOArrg='ALL',$(vMapExpr(vte.TASKNAME)),BANCOArrg) as BANCONuevo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident Horas;&lt;/P&gt;&lt;P&gt;drop Table Horas; rename Table t to Horas;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem I have is that I need to make to different wildmaps over the same dimension (the dimension I am evaluation being: vte.TASKNAME), in other words, I need to find: one, the client (BancoNuevo), listed inside the vte.TASKNAME and the product (PRODNuevo) also listed inside the same vte.TASKNAME. My problem is that when I do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(PRODArrg='ALL',$(vMapExpr(vte.TASKNAME)),PRODArrg) as PRODNuevo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(BANCOArrg='ALL',$(vMapExpr(vte.TASKNAME)),BANCOArrg) as BANCONuevo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident Horas;&lt;/P&gt;&lt;P&gt;drop Table Horas; rename Table t to Horas;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it apply the wildmap to both the client and product, and I end up with products inside the client list and clients inside the product list. I've also tried to make an if of the two; like evaluate first this and if it is this, then evaluate this other one, but it didn't work...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 04 Aug 2017 13:32:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-08-04T13:32:30Z</dc:date>
    <item>
      <title>Two different variables inside a wildmap</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-variables-inside-a-wildmap/m-p/1354355#M415835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the following script to creat a wildmap iteration inside a dimension that list description of other lines inside the table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;wildmap:&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;rowno() as Label;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;Key, Label1&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;SET vMapKey=; // Initialize variable&lt;/P&gt;&lt;P&gt;SET vMapLabel=; // Initialize variable&lt;/P&gt;&lt;P&gt;SET comma=; // Initialize variable&lt;/P&gt;&lt;P&gt;SET esc = chr(01); // The character we will use to escape quotes&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Loop through the rows of the wildmatch table to build the expression string,&lt;/P&gt;&lt;P&gt;FOR i = 0 to NoOfRows('wildmap')-1&lt;/P&gt;&lt;P&gt;LET vMapKey = vMapKey &amp;amp; comma &amp;amp; $(esc) &amp;amp; peek('Key', i, 'wildmap') &amp;amp; $(esc);&lt;/P&gt;&lt;P&gt;LET vMapLabel = vMapLabel &amp;amp; comma &amp;amp; $(esc) &amp;amp; peek('Label1', i, 'wildmap') &amp;amp; $(esc);&lt;/P&gt;&lt;P&gt;SET comma = ','; // Next time through the loop, insert a comma&lt;/P&gt;&lt;P&gt;NEXT i&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SET i=; // Drop unneeded variable&lt;/P&gt;&lt;P&gt;SET comma=; // Drop unneeded variable&lt;/P&gt;&lt;P&gt;// For this example, I'm going to keep the wildmatch table for illustrative purposes on the Sheet.&lt;/P&gt;&lt;P&gt;//DROP TABLE wildmap;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // Drop the wildmatch table -- don't need it anymore&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;// Combine the key and label values, replacing the $(esc) char with real quotes, to build the expression&lt;/P&gt;&lt;P&gt;LET vMapExpr = replace('pick(wildMatch($1,$(vMapKey)), $(vMapLabel))', $(esc), chr(39));&lt;/P&gt;&lt;P&gt;SET vMapKey=; // Drop unneeded variable&lt;/P&gt;&lt;P&gt;SET vMapLabel=; // Drop unneeded variable&lt;/P&gt;&lt;P&gt;SET esc=; // Drop unneeded variable&lt;/P&gt;&lt;P&gt;//exit script;&lt;/P&gt;&lt;P&gt;t:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(BANCOArrg='ALL',$(vMapExpr(vte.TASKNAME)),BANCOArrg) as BANCONuevo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident Horas;&lt;/P&gt;&lt;P&gt;drop Table Horas; rename Table t to Horas;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the problem I have is that I need to make to different wildmaps over the same dimension (the dimension I am evaluation being: vte.TASKNAME), in other words, I need to find: one, the client (BancoNuevo), listed inside the vte.TASKNAME and the product (PRODNuevo) also listed inside the same vte.TASKNAME. My problem is that when I do something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;t:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF(PRODArrg='ALL',$(vMapExpr(vte.TASKNAME)),PRODArrg) as PRODNuevo,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(BANCOArrg='ALL',$(vMapExpr(vte.TASKNAME)),BANCOArrg) as BANCONuevo&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Resident Horas;&lt;/P&gt;&lt;P&gt;drop Table Horas; rename Table t to Horas;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;it apply the wildmap to both the client and product, and I end up with products inside the client list and clients inside the product list. I've also tried to make an if of the two; like evaluate first this and if it is this, then evaluate this other one, but it didn't work...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Aug 2017 13:32:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-variables-inside-a-wildmap/m-p/1354355#M415835</guid>
      <dc:creator />
      <dc:date>2017-08-04T13:32:30Z</dc:date>
    </item>
    <item>
      <title>Re: Two different variables inside a wildmap</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-variables-inside-a-wildmap/m-p/1354356#M415836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jesus,&lt;/P&gt;&lt;P&gt;I hope I understand what you're trying to achieve but maybe the Wildmatch and Pick functions are better suited to your&amp;nbsp; needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pick(WildMatch(TASKNAME,'*BANISTMO*','*BC*','*BOLE*','*BOLP*','*DAVIVIENDA*','*FACTURAN*','*INNOVA*','*LAFISE*','*LOLB*','*LOLBe*','*mtrx*','*PSE*','*SUFI*'),&lt;/P&gt;&lt;P&gt;'BANI','BC','BOLE','BANCAENLINEA','DAV','FACTURANET','FILIALESEXTERIOR','LAFISE','BANCAENLINEA','BOLE','BANCAMOVIL','PSE','SUFI')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;will look in TASKNAME and return the element in the second list that corresponds to the position of the first mask that in found in TASKNAME.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e if &lt;SPAN style="font-size: 13.3333px;"&gt;'*BANISTMO*' is not found but&lt;/SPAN&gt;'*BC*' is found &lt;SPAN style="font-size: 13.3333px;"&gt;the expression will return the second element in the second list - 'BC'.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;You could write a similar expression to look for products.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Hope this helps.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Good luck&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Andrew&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Aug 2017 14:05:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-variables-inside-a-wildmap/m-p/1354356#M415836</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-08-04T14:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Two different variables inside a wildmap</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-variables-inside-a-wildmap/m-p/1354357#M415837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked out perfectly! Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Aug 2017 17:44:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-variables-inside-a-wildmap/m-p/1354357#M415837</guid>
      <dc:creator />
      <dc:date>2017-08-08T17:44:05Z</dc:date>
    </item>
    <item>
      <title>Re: Two different variables inside a wildmap</title>
      <link>https://community.qlik.com/t5/QlikView/Two-different-variables-inside-a-wildmap/m-p/1354358#M415838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jesus,&lt;/P&gt;&lt;P&gt;&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; Glad I was able to help. If you're satisfied with my answer please mark it as correct and this will close the thread.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Aug 2017 14:31:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-different-variables-inside-a-wildmap/m-p/1354358#M415838</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-08-09T14:31:24Z</dc:date>
    </item>
  </channel>
</rss>

