<?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 adding an expression into a load script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/adding-an-expression-into-a-load-script/m-p/241927#M92319</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following on from this:&lt;/P&gt;&lt;P&gt;I have &lt;B&gt;TableA&lt;/B&gt; that contains a list of Items. Each Item has one &lt;B&gt;SubItem&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Using Table_2 that contains the data on the Subitems, I create a similar expression - &lt;B&gt;SubItem_Status&lt;/B&gt;&lt;/P&gt;&lt;P&gt;I want to add the expressions &lt;B&gt;Item_Status&lt;/B&gt; and &lt;B&gt;SubItem_Status&lt;/B&gt; together in the load script to create &lt;B&gt;Overall_Status&lt;/B&gt;&lt;/P&gt;&lt;P&gt;I can achieve this in a straight table but cannot emulate it in the script.&lt;/P&gt;&lt;P&gt;Help appreciated.&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Mar 2011 16:32:24 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-09T16:32:24Z</dc:date>
    <item>
      <title>adding an expression into a load script</title>
      <link>https://community.qlik.com/t5/QlikView/adding-an-expression-into-a-load-script/m-p/241924#M92316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having problems placing an expression in a load script and would appreciate any help.&lt;/P&gt;&lt;P&gt;I load the following table okay:&lt;/P&gt;&lt;P&gt;Table_1:&lt;/P&gt;&lt;P&gt;&lt;B&gt;LOAD&lt;/B&gt; ID,&lt;/P&gt;&lt;P&gt;Item_Name,&lt;/P&gt;&lt;P&gt;Component_Name,&lt;/P&gt;&lt;P&gt;Fail_Date,&lt;/P&gt;&lt;P&gt;Weighting;&lt;/P&gt;&lt;P&gt;&lt;B&gt;SQL&lt;/B&gt; SELECT *&lt;/P&gt;&lt;P&gt;&lt;B&gt;FROM&lt;/B&gt; Database1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are 20 Components per Item. Each has a weighting of either 1 or 2.&lt;/P&gt;&lt;P&gt;I want to add into the load script the following expression that will:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add weighting only if there is a fail date.&lt;/P&gt;&lt;P&gt;Then sum all the weighting for each Item returning a 1 if the total is &amp;gt;1 , else 0.&lt;/P&gt;&lt;P&gt;-(If total is over 1 then the item fails.)&lt;/P&gt;&lt;P&gt;( I will add date filters later to the dashboard).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can then use the 1 and 0 to calculate number of fails etc for any given period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(sum(if(isnull(Fail_Date),0,(Weighting)))&amp;gt;1,1,0)as Item_Status&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks in advance&lt;/P&gt;&lt;P&gt;john&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Mar 2011 18:23:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-an-expression-into-a-load-script/m-p/241924#M92316</guid>
      <dc:creator />
      <dc:date>2011-03-08T18:23:25Z</dc:date>
    </item>
    <item>
      <title>adding an expression into a load script</title>
      <link>https://community.qlik.com/t5/QlikView/adding-an-expression-into-a-load-script/m-p/241925#M92317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;Add a second step in your load script, using the QV table loaded previously and grouping the data only by id and item. So you can calculate the total weight over all the components of each item.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 09:40:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-an-expression-into-a-load-script/m-p/241925#M92317</guid>
      <dc:creator>nstefaniuk</dc:creator>
      <dc:date>2011-03-09T09:40:36Z</dc:date>
    </item>
    <item>
      <title>adding an expression into a load script</title>
      <link>https://community.qlik.com/t5/QlikView/adding-an-expression-into-a-load-script/m-p/241926#M92318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Thanks for replying&lt;/P&gt;&lt;P&gt;I finally got it to work - not sure if this is the most elegant solution or best practice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table_1:&lt;/P&gt;&lt;P&gt;LOAD ID,&lt;/P&gt;&lt;P&gt;`Item_Name`,&lt;/P&gt;&lt;P&gt;`Component_Name`,&lt;/P&gt;&lt;P&gt;`Fail_Date`,&lt;/P&gt;&lt;P&gt;Weighting;&lt;/P&gt;&lt;P&gt;SQL SELECT *&lt;/P&gt;&lt;P&gt;FROM `Table_1`;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Item_Summary:&lt;/P&gt;&lt;P&gt;LOAD Item_Name,&lt;/P&gt;&lt;P&gt;if(sum(if(isnull(Fail_Date),0,(Weighting)))&amp;gt;1,1,0)as Item_Status&lt;/P&gt;&lt;P&gt;RESIDENT Table_1&lt;/P&gt;&lt;P&gt;GROUP BY Item_Name&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 11:56:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-an-expression-into-a-load-script/m-p/241926#M92318</guid>
      <dc:creator />
      <dc:date>2011-03-09T11:56:33Z</dc:date>
    </item>
    <item>
      <title>adding an expression into a load script</title>
      <link>https://community.qlik.com/t5/QlikView/adding-an-expression-into-a-load-script/m-p/241927#M92319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Following on from this:&lt;/P&gt;&lt;P&gt;I have &lt;B&gt;TableA&lt;/B&gt; that contains a list of Items. Each Item has one &lt;B&gt;SubItem&lt;/B&gt;&lt;/P&gt;&lt;P&gt;Using Table_2 that contains the data on the Subitems, I create a similar expression - &lt;B&gt;SubItem_Status&lt;/B&gt;&lt;/P&gt;&lt;P&gt;I want to add the expressions &lt;B&gt;Item_Status&lt;/B&gt; and &lt;B&gt;SubItem_Status&lt;/B&gt; together in the load script to create &lt;B&gt;Overall_Status&lt;/B&gt;&lt;/P&gt;&lt;P&gt;I can achieve this in a straight table but cannot emulate it in the script.&lt;/P&gt;&lt;P&gt;Help appreciated.&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 16:32:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/adding-an-expression-into-a-load-script/m-p/241927#M92319</guid>
      <dc:creator />
      <dc:date>2011-03-09T16:32:24Z</dc:date>
    </item>
  </channel>
</rss>

