<?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 Error in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/316843#M1201143</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alberto,&lt;/P&gt;&lt;P&gt;You can't compare a value with a wildcard using an =&lt;/P&gt;&lt;P&gt;What you need to do for that is to use WildMatch:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(WildMatch([Anno cal./mese],'NOV*'),'Noviembre')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You can also convert that text to a date using date#:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date#([Anno cal./mese], 'MMM YYYY')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;With a date value, you can use the MMMMM format patern to get the long month description.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Mar 2011 15:58:17 GMT</pubDate>
    <dc:creator>stephencredmond</dc:creator>
    <dc:date>2011-03-29T15:58:17Z</dc:date>
    <item>
      <title>Error in script</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/316842#M1201142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to create some fileds from an Excel file. My file contains a column titled "Anno cal./mese" wich has the year and month in text format:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;GEN 2011&lt;/STRONG&gt; / &lt;STRONG&gt;FEB 2011&lt;/STRONG&gt; / &lt;STRONG&gt;MAR 2011&lt;/STRONG&gt; ...&lt;/P&gt;&lt;P&gt;My intention is to convert this information into two new created fields, &lt;STRONG&gt;Año&lt;/STRONG&gt; &amp;amp; &lt;STRONG&gt;Mes.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;In the loading script i wrote the following:&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt; Materiale,&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= 'GEN*', 'Enero',&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= 'FEB*','Febrero',&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= 'MAR*','Marzo',&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= 'APR*','Abril',&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= 'MAG*','Mayo',&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= 'GIU*','Junio',&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= 'LUG*','Julio',&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= 'AGO*','Agosto',&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= 'SET*','Septiembre',&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= 'OTT*','Octubre',&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= 'NOV*','Noviembre',&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= 'DIC*','Diciembre', 'ERROR')))))))))))) &lt;B&gt;as&lt;/B&gt; Mes,&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= ('*200*' &lt;B&gt;or&lt;/B&gt; '*199*'),'Antiguo',&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= '*2010','2010',&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= '*2011','2011',&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= '*2012','2012',&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= '*2013','2013',&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= '*2014','2014',&lt;/P&gt;&lt;P&gt;IF([Anno cal./mese]= '*2015','2015','Actualizar Scrpit'))))))) &lt;B&gt;as&lt;/B&gt; Año,&lt;/P&gt;&lt;P&gt;[Quantità PF] &lt;B&gt;as&lt;/B&gt; Venta&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;O&gt;&lt;/O&gt;&lt;/P&gt;&lt;P&gt;(biff, embedded labels, table is Hoja1$);&lt;/P&gt;&lt;P&gt;The script loads OK, but both new fields &lt;STRONG&gt;Año&lt;/STRONG&gt; &amp;amp; &lt;STRONG&gt;Mes&lt;/STRONG&gt; contain only values 'ERROR' &amp;amp; 'Actualizar Scrpit'&lt;/P&gt;&lt;P&gt;Can somenone help me find were is the error or make any comment?&lt;/P&gt;&lt;P&gt;I appreciate your help,&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2011 15:43:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/316842#M1201142</guid>
      <dc:creator />
      <dc:date>2011-03-29T15:43:24Z</dc:date>
    </item>
    <item>
      <title>Error in script</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/316843#M1201143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Alberto,&lt;/P&gt;&lt;P&gt;You can't compare a value with a wildcard using an =&lt;/P&gt;&lt;P&gt;What you need to do for that is to use WildMatch:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(WildMatch([Anno cal./mese],'NOV*'),'Noviembre')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;You can also convert that text to a date using date#:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Date#([Anno cal./mese], 'MMM YYYY')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;With a date value, you can use the MMMMM format patern to get the long month description.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2011 15:58:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/316843#M1201143</guid>
      <dc:creator>stephencredmond</dc:creator>
      <dc:date>2011-03-29T15:58:17Z</dc:date>
    </item>
    <item>
      <title>Error in script</title>
      <link>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/316844#M1201144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When you use the single quotes ('DIC*'), it creates a string literal. Your wildcard (asterisk *) is not doing what you want. It is literally checking if the value in the field is DIC*, whereas you want to see if it starts with DIC and then has some text after that.&lt;/P&gt;&lt;P&gt;I recommend using the following String funcitons lo split your column into two separate columns, and then using the Map function to map to the correct month name:&lt;/P&gt;&lt;P&gt;First, create a mapping table:&lt;/P&gt;&lt;P&gt;Mes_Map:&lt;/P&gt;&lt;P&gt;mapping load * inline [&lt;/P&gt;&lt;P&gt;Abbr, Name&lt;/P&gt;&lt;P&gt;GEN, Enero&lt;/P&gt;&lt;P&gt;FEB, Febrero&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next, you can use Subfield and ApplyMap to get the values you want.&lt;/P&gt;&lt;P&gt;ApplyMap('Mes_Map', subfield([Anno cal./mese], ' ', 1)) AS Mes // Get the month (mes) name, based on the abbreviation&lt;/P&gt;&lt;P&gt;subfield([Anno cal./mese], ' ', 2) AS Ano // Get the year (ano)&lt;/P&gt;&lt;P&gt;The subfield function splits the string into different pieces. If you split on ' ' and select the first field, you will get your month. If you do the same split and select the second field, you will get the year.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Mar 2011 16:09:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Error-in-script/m-p/316844#M1201144</guid>
      <dc:creator />
      <dc:date>2011-03-29T16:09:47Z</dc:date>
    </item>
  </channel>
</rss>

