<?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: create variable in load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/create-variable-in-load-script/m-p/983280#M335626</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Swuehi for all the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 24 Aug 2015 20:41:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-08-24T20:41:15Z</dc:date>
    <item>
      <title>create variable in load script</title>
      <link>https://community.qlik.com/t5/QlikView/create-variable-in-load-script/m-p/983276#M335622</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;I have COL1, COL2, COL3 &amp;amp; Total as the columns.&lt;/P&gt;&lt;P&gt;Total is the sum of COL1,COL2, COL3.&lt;/P&gt;&lt;P&gt;I have all the above columns in excel. I wanted to make sure that the Total is caluclated correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use the load script having COL1, COL2,COL3 and Total&amp;nbsp; but not sure how to create a variable and calculate Vtotal =COl1+COL2+COL3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and then&amp;nbsp; create another variable called VDiff&amp;nbsp; to subtract Total -Vtotal .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to see COL1,COL2, COL3, TOTAL , VTOTAL and VDiff&amp;nbsp; in Table Box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you help me&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 19:30:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-variable-in-load-script/m-p/983276#M335622</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-24T19:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: create variable in load script</title>
      <link>https://community.qlik.com/t5/QlikView/create-variable-in-load-script/m-p/983277#M335623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You want to create a calculated field in the LOAD statement, right? (I wouldn't call it variable then, because this has a different meaning in QV scripting and QV frontend)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe something along these lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LOAD COL1, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COL2, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COL3, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TOTAL,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="font-size: 13.3333330154419px;"&gt;Rangesum(COL1, COL2, COL3) as VTOTAL;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;FROM Excel.xls;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can even calculate the difference in the script, like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;LOAD *, &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG&gt;TOTAL - VTOTAL as DIFF;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;LOAD COL1, &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COL2, &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COL3, &lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TOTAL,&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="font-size: 13.3333330154419px;"&gt;Rangesum(COL1, COL2, COL3) as VTOTAL;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px;"&gt;FROM Excel.xls;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I use a preceding LOAD here to add a calculated field that itself uses a calculated field in the first, bottom LOAD statement.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 19:44:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-variable-in-load-script/m-p/983277#M335623</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-08-24T19:44:36Z</dc:date>
    </item>
    <item>
      <title>Re: create variable in load script</title>
      <link>https://community.qlik.com/t5/QlikView/create-variable-in-load-script/m-p/983278#M335624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thank you . Tbe more precise, I have the following columns&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exposure&lt;/P&gt;&lt;P&gt;Collaterals&lt;/P&gt;&lt;P&gt;RiskWt_PCT&lt;/P&gt;&lt;P&gt;CalRW&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the above fields are already there in my csv file. I want to usie load script and&amp;nbsp; also calculate the below variable in the load script and show them in Table Box.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What i want to do is first check if the CalRW is calculated correctly.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So i want to create a variable VCalRW&amp;nbsp; and calculate it as&amp;nbsp; VCalRW = Risk_PCT*(Exposure-Collateral)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now i also want to create another variable VDiff to calculate CalRW - VCalRW.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to see Exposure, Collateral,RiskWT_PCT,CalRW, VCalRW and VDiff in the Table box&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 19:53:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-variable-in-load-script/m-p/983278#M335624</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-24T19:53:40Z</dc:date>
    </item>
    <item>
      <title>Re: create variable in load script</title>
      <link>https://community.qlik.com/t5/QlikView/create-variable-in-load-script/m-p/983279#M335625</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Should be quite similar to above:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;LOAD *,&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CalRW&lt;STRONG style="font-style: inherit; font-size: 13.3333320617676px; font-family: inherit;"&gt;- VCalRW as VDiff;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;LOAD Exposure,&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Collaterals,&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RiskWt_PCT,&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CalRW,&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RiskWt_PCT*(Exposure-Collaterals) &lt;STRONG style="font-style: inherit; font-size: 13.3333330154419px; font-family: inherit;"&gt;as VCalRW;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333330154419px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d; background-color: #f2f2f2;"&gt;FROM ...;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 19:58:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-variable-in-load-script/m-p/983279#M335625</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2015-08-24T19:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: create variable in load script</title>
      <link>https://community.qlik.com/t5/QlikView/create-variable-in-load-script/m-p/983280#M335626</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Swuehi for all the help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Aug 2015 20:41:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/create-variable-in-load-script/m-p/983280#M335626</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-24T20:41:15Z</dc:date>
    </item>
  </channel>
</rss>

