<?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: What's the problem? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640482#M594797</link>
    <description>&lt;P&gt;Yet again, I don't see 69 within&amp;nbsp;&lt;STRONG&gt;CODICE_PRESTAZIONE&lt;/STRONG&gt; field on tab &lt;STRONG&gt;Tariffario&lt;/STRONG&gt; or &lt;STRONG&gt;Tariffario (2)&lt;/STRONG&gt;... where exactly am I looking?&lt;/P&gt;</description>
    <pubDate>Mon, 28 Oct 2019 16:36:22 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2019-10-28T16:36:22Z</dc:date>
    <item>
      <title>What's the problem?</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640457#M594793</link>
      <description>&lt;P&gt;Hi guys,&lt;/P&gt;&lt;P&gt;i've a big problem with the following query, in particular with this script:&lt;/P&gt;&lt;P&gt;If(WildMatch(ApplyMap('KEY_TO_BS_STS21',ApplyMap('DOUBLE_MAPPING',[@10:17],'n/a')),008), If([@4:9]=030357,'PS_RADIO','RADIO'),&lt;BR /&gt;If(WildMatch(ApplyMap('KEY_TO_BS_STS21',ApplyMap('DOUBLE_MAPPING',[@10:17],'n/a')),'011'), If([@4:9]=030357,'PS_LAB','LAB')))&lt;/P&gt;&lt;P&gt;as new_field&lt;/P&gt;&lt;P&gt;With these conditions, also the rows n°4 and&amp;nbsp; n°19 it should be valued, respectively with "PS_RADIO" and "PS_LAB".&lt;/P&gt;&lt;P&gt;Why it don't work? It's a problem of data format, syntax (brackets) or something else?&lt;/P&gt;&lt;P&gt;Attached is a sample data file.&lt;/P&gt;&lt;P&gt;Please, someone could show me the right direction?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mattia&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 15:58:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640457#M594793</guid>
      <dc:creator>Mattia</dc:creator>
      <dc:date>2019-10-28T15:58:48Z</dc:date>
    </item>
    <item>
      <title>Re: What's the problem?</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640468#M594795</link>
      <description>&lt;P&gt;It seems that your&amp;nbsp;&lt;STRONG&gt;2019_Tariffario_C.xlsx&lt;/STRONG&gt; file is not complete... I am not able to make the ApplyMap from&amp;nbsp;KEY_TO_BS_STS21 to work at all... Is this the actual file or did you accidentally deleted some stuff... 69, 54, 36 are not showing up.... within &lt;STRONG&gt;CODICE_PRESTAZIONE&lt;/STRONG&gt; column of the Excel file.&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 16:22:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640468#M594795</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-10-28T16:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: What's the problem?</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640480#M594796</link>
      <description>&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;please, try with this file that is attached.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 17:02:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640480#M594796</guid>
      <dc:creator>Mattia</dc:creator>
      <dc:date>2019-10-28T17:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: What's the problem?</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640482#M594797</link>
      <description>&lt;P&gt;Yet again, I don't see 69 within&amp;nbsp;&lt;STRONG&gt;CODICE_PRESTAZIONE&lt;/STRONG&gt; field on tab &lt;STRONG&gt;Tariffario&lt;/STRONG&gt; or &lt;STRONG&gt;Tariffario (2)&lt;/STRONG&gt;... where exactly am I looking?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 16:36:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640482#M594797</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-10-28T16:36:22Z</dc:date>
    </item>
    <item>
      <title>Re: What's the problem?</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640487#M594798</link>
      <description>&lt;P&gt;I think that you're taking the wrong column, because in the script the field is "BS_STS21" while the value 69 is from column "DISCIPLINA".&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 16:42:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640487#M594798</guid>
      <dc:creator>Mattia</dc:creator>
      <dc:date>2019-10-28T16:42:08Z</dc:date>
    </item>
    <item>
      <title>Re: What's the problem?</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640491#M594799</link>
      <description>&lt;P&gt;Let's take an example....&lt;/P&gt;&lt;P&gt;I picked the row&amp;nbsp;CONTATORE_PRESCRIZIONE =&amp;nbsp;01634821. After I apply -&amp;gt;&amp;nbsp;ApplyMap('DOUBLE_MAPPING',[@10:17],'n/a')... I get 69.... now Next step is the next ApplyMap... which would be something like this -&amp;gt;&amp;nbsp;WildMatch(ApplyMap('KEY_TO_BS_STS21',69) it need to give me 008, correct? Now in order to do this, I need to have 69 here&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 413px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/22472i0B65E1C5CB5979C0/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But I don't see 69 within 2019_Tariffario_C.xlsx or the other file you sent.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this make sense?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 16:48:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640491#M594799</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-10-28T16:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: What's the problem?</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640493#M594800</link>
      <description>&lt;P&gt;Ok, the value e.g. 69 is part of column "DISCIPLINA" and you can find it in the script in the table "D":&lt;/P&gt;&lt;P&gt;table "D":&lt;BR /&gt;LOAD ...&lt;BR /&gt;[@26:27] as DISCIPLINA,&lt;/P&gt;&lt;P&gt;Also, the source is the file in the zip called sample_data_D&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 17:01:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640493#M594800</guid>
      <dc:creator>Mattia</dc:creator>
      <dc:date>2019-10-28T17:01:56Z</dc:date>
    </item>
    <item>
      <title>Re: What's the problem?</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640503#M594801</link>
      <description>&lt;P&gt;This make sense... I think problem is that you have multiple matches within your mapping table... for example... when I run this&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;DOUBLE_MAPPING:
LOAD [@10:17] as CONTATORE_PRESCRIZIONE,
     [@29:33] as CODICE_PRESTAZIONE
     
FROM [Sample data_D.txt]
(fix, utf8, no labels);&lt;/LI-CODE&gt;&lt;P&gt;For a given&amp;nbsp;CONTATORE_PRESCRIZIONE, I see multiple&amp;nbsp;CODICE_PRESTAZIONE&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 362px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/22475iACEAC035B824D48A/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But mapping is only able to map it to the first instance... which is picking up&amp;nbsp;CODICE_PRESTAZIONE of 897B7. This in the end becomes 019. But you seem to want it to pick 8828, so that it can become 008. But what is the logic for picking 8828 instead of 897B7?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 17:29:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640503#M594801</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2019-10-28T17:29:18Z</dc:date>
    </item>
    <item>
      <title>Re: What's the problem?</title>
      <link>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640511#M594802</link>
      <description>&lt;P&gt;Actually, for every CONTATORE", all the records with different "CODICE PRESTAZIONE" must be picked and valued in the column "TIPO". Anyway, it's perfectly normal that every CONTATORE i've multiple CODICE PRESTAZIONE.&lt;/P&gt;&lt;P&gt;e.g. 897B7 must have "PS_AMB" in the column "TIPO" (now, the query is partial hidden because i think that the problem is not in the following script:&amp;nbsp;If(Len(Trim([@10:17]))&amp;gt;0, If([@4:9]=030357,'PS_AMB','AMB').&lt;/P&gt;&lt;P&gt;The strange thinG is that if i insert a inline table, the query works perfectly (see the attached file).&lt;/P&gt;&lt;P&gt;The output that i want to obtain is the following: if the field BS_STS21 = 008 and if the field CODICE_PRESIDIO = 030357, the record must show PS_RADIO, instead RADIO; if the field BS_STS21 = 011 and&amp;nbsp;if the field CODICE_PRESIDIO = 030357, the record must show PS_LAB, instead LAB. All the records must have a value in the column TIPO.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Oct 2019 17:56:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-s-the-problem/m-p/1640511#M594802</guid>
      <dc:creator>Mattia</dc:creator>
      <dc:date>2019-10-28T17:56:12Z</dc:date>
    </item>
  </channel>
</rss>

