<?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: Case statement in Load Script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Case-statement-in-Load-Script/m-p/736303#M1049997</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can look up the conditional functions in help e.g. if then else. Or Sub...end sub if you need a loop to create fields/tables.&lt;/P&gt;&lt;P&gt;Maybe something like this works for you:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;if(Product = 'Toys',&amp;nbsp; [Revenue] + [Tax] + [GP], [Revenue]) as TotalPrice&lt;/P&gt;&lt;P&gt;resident / from...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Oct 2014 22:59:10 GMT</pubDate>
    <dc:creator>danieloberbilli</dc:creator>
    <dc:date>2014-10-30T22:59:10Z</dc:date>
    <item>
      <title>Case statement in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Case-statement-in-Load-Script/m-p/736300#M1049992</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'm new to Qlikview, Is it possible to write a case statement in the Load script? i'm trying to write the below script and its giving syntax errors. can someone please help me in figuring out this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; CASE WHEN (Product ='Toys')&lt;/P&gt;&lt;P&gt;THEN ([Revenue]+[Tax]+[GP]) ELSE&lt;/P&gt;&lt;P&gt;([Revenue]) END TotalPrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 17:53:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-statement-in-Load-Script/m-p/736300#M1049992</guid>
      <dc:creator />
      <dc:date>2014-10-30T17:53:48Z</dc:date>
    </item>
    <item>
      <title>Re: Case statement in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Case-statement-in-Load-Script/m-p/736301#M1049994</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; IF( Product = 'Toys', [Revenue]+[Tax]+[GP], [Revenue]) as TotalPrice,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;FROM ...;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 22:54:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-statement-in-Load-Script/m-p/736301#M1049994</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2014-10-30T22:54:13Z</dc:date>
    </item>
    <item>
      <title>Re: Case statement in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Case-statement-in-Load-Script/m-p/736302#M1049995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if(Product = 'Toys',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Revenue] + [Tax] + [GP],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [Revenue]&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;&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; AS TotalPrice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 22:58:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-statement-in-Load-Script/m-p/736302#M1049995</guid>
      <dc:creator>simondachstr</dc:creator>
      <dc:date>2014-10-30T22:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Case statement in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Case-statement-in-Load-Script/m-p/736303#M1049997</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can look up the conditional functions in help e.g. if then else. Or Sub...end sub if you need a loop to create fields/tables.&lt;/P&gt;&lt;P&gt;Maybe something like this works for you:&lt;/P&gt;&lt;P&gt;Load&lt;/P&gt;&lt;P&gt;if(Product = 'Toys',&amp;nbsp; [Revenue] + [Tax] + [GP], [Revenue]) as TotalPrice&lt;/P&gt;&lt;P&gt;resident / from...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 22:59:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-statement-in-Load-Script/m-p/736303#M1049997</guid>
      <dc:creator>danieloberbilli</dc:creator>
      <dc:date>2014-10-30T22:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Case statement in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Case-statement-in-Load-Script/m-p/736304#M1049999</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 think the When statement, as well as Case are control structures for altering the behaviour of complete blocks of script (for example full tables).&lt;/P&gt;&lt;P&gt;What you describe can be done either with pick(match()) or if. Pick(match()) can be useful if you have several escenarios like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;pick(match(Product, 'Toys','Fruits','Furniture'), Formula1, Formula2, Formula3) as Field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;otherwise it would be better with an if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 23:33:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-statement-in-Load-Script/m-p/736304#M1049999</guid>
      <dc:creator>jaimeaguilar</dc:creator>
      <dc:date>2014-10-30T23:33:39Z</dc:date>
    </item>
    <item>
      <title>Re: Case statement in Load Script</title>
      <link>https://community.qlik.com/t5/QlikView/Case-statement-in-Load-Script/m-p/736305#M1050001</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Everyone!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Oct 2014 11:58:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Case-statement-in-Load-Script/m-p/736305#M1050001</guid>
      <dc:creator />
      <dc:date>2014-10-31T11:58:25Z</dc:date>
    </item>
  </channel>
</rss>

