<?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 IF Statement in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/IF-Statement-in-script/m-p/1334400#M837584</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to load an IF statement in my script like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(DocType='Invoice Receipt',AcctingQty,'') AS IR_Qty,&lt;/P&gt;&lt;P&gt;if(DocType='Acct. Adj.', AcctingQty,'') AS Adj_Qty &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the DocType is Invoice Receipt I want it to load the AcctingQty that are those DocTypes. Am I doing this correctly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm stuggling to get this to load as both fields are in different tables, but even though the tables are joined, it still fails thinking that DocType isnt there even though it was declared at the beginning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>khaycock</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>IF Statement in script</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-in-script/m-p/1334400#M837584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to load an IF statement in my script like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(DocType='Invoice Receipt',AcctingQty,'') AS IR_Qty,&lt;/P&gt;&lt;P&gt;if(DocType='Acct. Adj.', AcctingQty,'') AS Adj_Qty &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the DocType is Invoice Receipt I want it to load the AcctingQty that are those DocTypes. Am I doing this correctly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm stuggling to get this to load as both fields are in different tables, but even though the tables are joined, it still fails thinking that DocType isnt there even though it was declared at the beginning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-in-script/m-p/1334400#M837584</guid>
      <dc:creator>khaycock</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement in script</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-in-script/m-p/1334401#M837585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For this to work, AcctingQty needs to be in the same table as DocType.&lt;/P&gt;&lt;P&gt;Join the tables first. Then use a resident load to declare the new fields.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 09:58:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-in-script/m-p/1334401#M837585</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2017-05-12T09:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement in script</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-in-script/m-p/1334402#M837586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I dont see anything wrong with the statements you posted. I suggest that you post more of your script to assist with disgnosing your problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 10:00:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-in-script/m-p/1334402#M837586</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2017-05-12T10:00:13Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement in script</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-in-script/m-p/1334403#M837587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;DocType was loaded into the fact table initially, AcctingQty is then being joined to the Fact table but by residenting another table. I would've thought I could've put the IFs in here or after here but I can't get it to work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The join to the FACT looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;left Join (Fact)&lt;/P&gt;&lt;P&gt;LOAD&lt;/P&gt;&lt;P&gt;AcctYear,&lt;/P&gt;&lt;P&gt;AcctDoc &amp;amp; '-' &amp;amp; AcctDoc_Item1 as %AcctDocKey,&lt;/P&gt;&lt;P&gt;AcctDoc_Reference,&lt;/P&gt;&lt;P&gt;AcctingQty&lt;/P&gt;&lt;P&gt;Resident table;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;DROP TABLE table;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;DocType is already in Fact as it was joined earlier so I'm not quite sure where you can put them&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 10:31:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-in-script/m-p/1334403#M837587</guid>
      <dc:creator>khaycock</dc:creator>
      <dc:date>2017-05-12T10:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: IF Statement in script</title>
      <link>https://community.qlik.com/t5/QlikView/IF-Statement-in-script/m-p/1334404#M837588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Fact:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;LOAD &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;DocType,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;%AcctDocKey,&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #3d3d3d; font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ....&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;FROM....;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Left Join (Fact)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;LOAD AcctYear,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AcctDoc &amp;amp; '-' &amp;amp; AcctDoc_Item1 as %AcctDocKey,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AcctDoc_Reference,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; AcctingQty&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Resident table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-size: 10pt; font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-size: 10pt; font-style: inherit; font-family: inherit;"&gt;DROP TABLE table;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-size: 10pt; font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-size: 10pt; font-style: inherit; font-family: inherit;"&gt;Final_Fact:&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-size: 10pt; font-style: inherit; font-family: inherit;"&gt;LOAD *,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(DocType='Invoice Receipt',AcctingQty,'') AS IR_Qty,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(DocType='Acct. Adj.', AcctingQty,'') AS Adj_Qty&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Resident Fact;&lt;/STRONG&gt;&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;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;DROP Table Fact;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 May 2017 11:06:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/IF-Statement-in-script/m-p/1334404#M837588</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-05-12T11:06:19Z</dc:date>
    </item>
  </channel>
</rss>

