<?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 Two where clauses in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Two-where-clauses/m-p/289008#M1200623</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the row with sum(Field3), you have to define it alias or sum(Field3) as Field3.&lt;/P&gt;&lt;P&gt;ADD is for partial loads. Maybe you are doing a partial load, but you might be looking to concatenate the tables. It that's the case you should use the function CONCATENATE.&lt;/P&gt;&lt;P&gt;If you have a sum in the script, the other fields in the load have to be included in a group by:&lt;/P&gt;&lt;P&gt;Load Field1,&lt;BR /&gt;Field2,&lt;BR /&gt;sum(Field3) as Field3&lt;BR /&gt;Resident Table&lt;BR /&gt;Group by Field1,Field2;&lt;/P&gt;&lt;P&gt;That's all I can see for now. I hope that helps.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Nov 2010 21:36:40 GMT</pubDate>
    <dc:creator>pover</dc:creator>
    <dc:date>2010-11-18T21:36:40Z</dc:date>
    <item>
      <title>Two where clauses</title>
      <link>https://community.qlik.com/t5/QlikView/Two-where-clauses/m-p/289007#M1200622</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 wondering what the best/Fastest way to create a table with "two" where-clauses would be.&lt;/P&gt;&lt;P&gt;This is how I have thought doing it&lt;/P&gt;&lt;P&gt;RawData:&lt;BR /&gt;LOAD&lt;BR /&gt;Field1,&lt;BR /&gt;Field2,&lt;BR /&gt;Field3,&lt;BR /&gt;Field4,&lt;BR /&gt;Date&lt;BR /&gt;from someqvdfile;&lt;BR /&gt;&lt;BR /&gt;Dates:&lt;BR /&gt;load Date resident RawData;&lt;/P&gt;&lt;P&gt;Let a = NoOfRows('Dates')&lt;BR /&gt;FOR I=0 to a&lt;BR /&gt;Let DateNow=fieldvalue('Date',I)&lt;/P&gt;&lt;P&gt;Table1:&lt;BR /&gt;LOAD&lt;BR /&gt;Field1,&lt;BR /&gt;Field2,&lt;BR /&gt;'0' as Field3,&lt;BR /&gt;sum(Field4),&lt;BR /&gt;$(DateNow) as TheDate&lt;BR /&gt;resident RawData where Date&amp;lt;=$(DateNow);&lt;BR /&gt;&lt;BR /&gt;ADD LOAD&lt;BR /&gt;Field1,&lt;BR /&gt;Field2,&lt;BR /&gt;sum(Field3),&lt;BR /&gt;'0' as Field4&lt;BR /&gt;$(DateNow) as TheDate&lt;BR /&gt;resident RawData where Date=$(DateNow);&lt;/P&gt;&lt;P&gt;... and then clear all entries where both Field3=0 and Field4=0 etc...&lt;/P&gt;&lt;P&gt;See what I'm trying to do here? In Table1 I want Field4 to be summed for all dates up to $(DateNow) and this works (verified) and then to this table I want to add the sum of Field3 for ONLY the date on $(DateNow). My solution seems correct in my eyes but doesnt seem to work. What am I doing wrong? Field3 becomes 0 on all entries&lt;/P&gt;&lt;P&gt;Thankful for help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Nov 2010 20:23:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-where-clauses/m-p/289007#M1200622</guid>
      <dc:creator />
      <dc:date>2010-11-18T20:23:37Z</dc:date>
    </item>
    <item>
      <title>Two where clauses</title>
      <link>https://community.qlik.com/t5/QlikView/Two-where-clauses/m-p/289008#M1200623</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In the row with sum(Field3), you have to define it alias or sum(Field3) as Field3.&lt;/P&gt;&lt;P&gt;ADD is for partial loads. Maybe you are doing a partial load, but you might be looking to concatenate the tables. It that's the case you should use the function CONCATENATE.&lt;/P&gt;&lt;P&gt;If you have a sum in the script, the other fields in the load have to be included in a group by:&lt;/P&gt;&lt;P&gt;Load Field1,&lt;BR /&gt;Field2,&lt;BR /&gt;sum(Field3) as Field3&lt;BR /&gt;Resident Table&lt;BR /&gt;Group by Field1,Field2;&lt;/P&gt;&lt;P&gt;That's all I can see for now. I hope that helps.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Nov 2010 21:36:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-where-clauses/m-p/289008#M1200623</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2010-11-18T21:36:40Z</dc:date>
    </item>
    <item>
      <title>Two where clauses</title>
      <link>https://community.qlik.com/t5/QlikView/Two-where-clauses/m-p/289009#M1200624</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, Thanks, I suspected that CONCATENATE might help me but I don't quite know how it works? Could anyone give an example using my table(s) above?&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Nov 2010 22:36:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Two-where-clauses/m-p/289009#M1200624</guid>
      <dc:creator />
      <dc:date>2010-11-18T22:36:37Z</dc:date>
    </item>
  </channel>
</rss>

