<?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: Writing 'If Statement' within the Load clause in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Writing-If-Statement-within-the-Load-clause/m-p/268555#M1188516</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;Hi Dave,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;Good question. Yes, I have used IF statement in 30 million rows document. I have noticed that it takes more time if you have nested if's. However, I have eventually changed IF statement to &lt;SPAN style="text-decoration: underline; color: #000080;"&gt;&lt;STRONG&gt;ApplyMap &lt;/STRONG&gt;&lt;/SPAN&gt;with a Mapping Load. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;I hope this helps.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;Cheers - DV&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 16 Sep 2011 16:11:30 GMT</pubDate>
    <dc:creator>IAMDV</dc:creator>
    <dc:date>2011-09-16T16:11:30Z</dc:date>
    <item>
      <title>Writing 'If Statement' within the Load clause</title>
      <link>https://community.qlik.com/t5/QlikView/Writing-If-Statement-within-the-Load-clause/m-p/268554#M1188515</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;Does writing 'If Statements' within the load clause in the script cause a significant slow down in the load speeds in you opinion. &lt;/P&gt;&lt;P&gt;I know it will depend in the number of 'ifs' and the number of records you are loading but has anyone ever had any issues with performance with this?&lt;/P&gt;&lt;P&gt;Interested to hear your experiences. Many thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dave &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 15:25:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Writing-If-Statement-within-the-Load-clause/m-p/268554#M1188515</guid>
      <dc:creator />
      <dc:date>2011-09-16T15:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Writing 'If Statement' within the Load clause</title>
      <link>https://community.qlik.com/t5/QlikView/Writing-If-Statement-within-the-Load-clause/m-p/268555#M1188516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;Hi Dave,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;Good question. Yes, I have used IF statement in 30 million rows document. I have noticed that it takes more time if you have nested if's. However, I have eventually changed IF statement to &lt;SPAN style="text-decoration: underline; color: #000080;"&gt;&lt;STRONG&gt;ApplyMap &lt;/STRONG&gt;&lt;/SPAN&gt;with a Mapping Load. &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;I hope this helps.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="font-family: trebuchet ms,geneva;"&gt;Cheers - DV&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Sep 2011 16:11:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Writing-If-Statement-within-the-Load-clause/m-p/268555#M1188516</guid>
      <dc:creator>IAMDV</dc:creator>
      <dc:date>2011-09-16T16:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Writing 'If Statement' within the Load clause</title>
      <link>https://community.qlik.com/t5/QlikView/Writing-If-Statement-within-the-Load-clause/m-p/268556#M1188517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Please check this method &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Map_1:&lt;/P&gt;&lt;P&gt;MAPPING LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; test,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 'Yes'&lt;/P&gt;&lt;P&gt;RESIDENT table1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New_Table:&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; test,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ApplyMap('Map_1',test,'b') AS test1&lt;/P&gt;&lt;P&gt;RESIDENT table2;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That should do it. &lt;/P&gt;&lt;P&gt;Regards ,&lt;/P&gt;&lt;P&gt;Perumal.A&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Sep 2011 06:41:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Writing-If-Statement-within-the-Load-clause/m-p/268556#M1188517</guid>
      <dc:creator>perumal_41</dc:creator>
      <dc:date>2011-09-17T06:41:29Z</dc:date>
    </item>
    <item>
      <title>Writing 'If Statement' within the Load clause</title>
      <link>https://community.qlik.com/t5/QlikView/Writing-If-Statement-within-the-Load-clause/m-p/268557#M1188518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;is your question about how to replace if()'s? Well, if you are using if's just to do kind of mapping, the already proposed mapping tables might be a solution if you are checking for equality on a single field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your question is more of an abstract kind, you will need to clarify what you understand under the term performance "issue". If an issue is that your load time may break a business requirement, than I would guess that many developers have experienced that kind of issue during development, but probably handled successfully by redesigning the load (maybe using some other techniques like mapping tables) and / or the reporting architecture (i.e. maybe using somekind of stages to prepare qvd's that can be reused and loaded optimized from within multiple qvw's) or using incremental load or...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So a solution to an "issue" is IMHO depending on your environment (technical and business).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your question is more about some comparative measures about using if's or don't use them in load, well I don't have data at hand. I would also guess that it is not only depending on number of if's and number of records, but also on type of comparison (i.e. string or numerical).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But if you can do the data transformation using an if or similar technique in the script, I would always prefer this over doing same in the front end, even if your load time increases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure if this helps, but have a nice weekend&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 17 Sep 2011 11:21:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Writing-If-Statement-within-the-Load-clause/m-p/268557#M1188518</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2011-09-17T11:21:45Z</dc:date>
    </item>
    <item>
      <title>Writing 'If Statement' within the Load clause</title>
      <link>https://community.qlik.com/t5/QlikView/Writing-If-Statement-within-the-Load-clause/m-p/268558#M1188519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks a lot for the info DV. I'll look into using the ApplyMap function. It's something I wasn't aware of.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dave. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 13:12:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Writing-If-Statement-within-the-Load-clause/m-p/268558#M1188519</guid>
      <dc:creator />
      <dc:date>2011-09-21T13:12:35Z</dc:date>
    </item>
    <item>
      <title>Writing 'If Statement' within the Load clause</title>
      <link>https://community.qlik.com/t5/QlikView/Writing-If-Statement-within-the-Load-clause/m-p/268559#M1188520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Perumal. That's interesting to know about. I will look into using that method in future.&lt;/P&gt;&lt;P&gt;Dave.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 13:18:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Writing-If-Statement-within-the-Load-clause/m-p/268559#M1188520</guid>
      <dc:creator />
      <dc:date>2011-09-21T13:18:21Z</dc:date>
    </item>
    <item>
      <title>Writing 'If Statement' within the Load clause</title>
      <link>https://community.qlik.com/t5/QlikView/Writing-If-Statement-within-the-Load-clause/m-p/268560#M1188521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Stefan. Yes, it was a vague question. I was just looking to see generally if the use of 'Ifs' in the script had a drastic effect on load time. You raise some interesting points there about the context of your application and the 'acceptable' performance. Thanks for the information and food for thought.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dave.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Sep 2011 13:31:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Writing-If-Statement-within-the-Load-clause/m-p/268560#M1188521</guid>
      <dc:creator />
      <dc:date>2011-09-21T13:31:42Z</dc:date>
    </item>
  </channel>
</rss>

