<?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: Creating new field and values in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Creating-new-field-and-values-in-script/m-p/997150#M964071</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for everyone's responses. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This solution is perfect (I should have mentioned that the list of different temperatures was a lot longer than my example, so an inline table wouldn't work). &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Jess&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Oct 2015 14:25:47 GMT</pubDate>
    <dc:creator>jessica_webb</dc:creator>
    <dc:date>2015-10-16T14:25:47Z</dc:date>
    <item>
      <title>Creating new field and values in script</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-new-field-and-values-in-script/m-p/997144#M964065</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm sure this must be really straightforward, but I can't find a solution anywhere! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a field with lots of different values, and I want to use these values to create a new field, with only 3 values, in the script. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;E.g.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temperature&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;12&lt;/P&gt;&lt;P&gt;100&lt;/P&gt;&lt;P&gt;30&lt;/P&gt;&lt;P&gt;25&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want a new field called 'Description' that gives the value 'Freezing' if the Temp is = 0, 'Boiling' if the Temp is = 100, and 'Between' if the the Temp is neither 0 or 100. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Jess&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2015 13:54:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-new-field-and-values-in-script/m-p/997144#M964065</guid>
      <dc:creator>jessica_webb</dc:creator>
      <dc:date>2015-10-16T13:54:49Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new field and values in script</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-new-field-and-values-in-script/m-p/997145#M964066</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Table:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&amp;nbsp; Pick(Match(Temperature, 0, 100, Temperature), 'Freezing', 'Boiling', 'Between') as Description;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD * Inline [&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Temperature&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;12&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;100&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;30&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;25&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;100&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;];&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/102249_Capture.PNG" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2015 14:03:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-new-field-and-values-in-script/m-p/997145#M964066</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-10-16T14:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new field and values in script</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-new-field-and-values-in-script/m-p/997146#M964067</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;Temperature,&lt;/P&gt;&lt;P&gt;if(Temperature=0,'Freezing',&lt;/P&gt;&lt;P&gt;if(Temperature=100,'Temp=100', 'Between')) as Temp&lt;/P&gt;&lt;P&gt;from ....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2015 14:04:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-new-field-and-values-in-script/m-p/997146#M964067</guid>
      <dc:creator>pokassov</dc:creator>
      <dc:date>2015-10-16T14:04:46Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new field and values in script</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-new-field-and-values-in-script/m-p/997147#M964068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Temprature:&lt;/P&gt;&lt;P&gt;LOAD *, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Temperature = 0 , 'Freezing', &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(Temperature = 100, 'Boiling',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Temperature &amp;gt;0 AND Temperature &amp;lt; 100, 'Between'))) As Description;&lt;/P&gt;&lt;P&gt;Load * Inline [&lt;/P&gt;&lt;P&gt;Temperature&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;12&lt;/P&gt;&lt;P&gt;100&lt;/P&gt;&lt;P&gt;30&lt;/P&gt;&lt;P&gt;25&lt;/P&gt;&lt;P&gt;1&lt;/P&gt;&lt;P&gt;0&lt;/P&gt;&lt;P&gt;100&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;V.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2015 14:07:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-new-field-and-values-in-script/m-p/997147#M964068</guid>
      <dc:creator>vishsaggi</dc:creator>
      <dc:date>2015-10-16T14:07:37Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new field and values in script</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-new-field-and-values-in-script/m-p/997148#M964069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will advocate for using PICK() and MATCH() Function simply for load performance.&lt;/P&gt;&lt;P&gt;Try this:-&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temperature_Data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;,PICK(MATCH(Temperature, 0 , 100 , Temperature),'Freezing','Boilong','Between')&amp;nbsp;&amp;nbsp;&amp;nbsp; AS Description&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Temperature&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 12&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 25&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDITED because I notice this same suggestion above&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2015 14:11:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-new-field-and-values-in-script/m-p/997148#M964069</guid>
      <dc:creator>Gabriel</dc:creator>
      <dc:date>2015-10-16T14:11:02Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new field and values in script</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-new-field-and-values-in-script/m-p/997149#M964070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You may use the following script in order to take care of temperatures other than 0 and 100 correctly.&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Temprature:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;LOAD *,&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Temperature &amp;lt;= 0 , 'Freezing',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF(Temperature &amp;gt;= 100, 'Boiling',&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(Temperature &amp;gt;0 AND Temperature &amp;lt; 100, 'Between'))) As Description;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Load * Inline [&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Temperature&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;0&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;12&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;100&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;30&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;25&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;1&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;0&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;100&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;];&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2015 14:22:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-new-field-and-values-in-script/m-p/997149#M964070</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2015-10-16T14:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: Creating new field and values in script</title>
      <link>https://community.qlik.com/t5/QlikView/Creating-new-field-and-values-in-script/m-p/997150#M964071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for everyone's responses. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This solution is perfect (I should have mentioned that the list of different temperatures was a lot longer than my example, so an inline table wouldn't work). &lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thanks again,&lt;/P&gt;&lt;P&gt;Jess&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Oct 2015 14:25:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Creating-new-field-and-values-in-script/m-p/997150#M964071</guid>
      <dc:creator>jessica_webb</dc:creator>
      <dc:date>2015-10-16T14:25:47Z</dc:date>
    </item>
  </channel>
</rss>

