<?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 Where Expression Using Conditions on Two Fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Where-Expression-Using-Conditions-on-Two-Fields/m-p/392692#M146464</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to create a variant on the following which also filters &lt;SPAN style="color: #800000; font-size: 8pt;"&gt;qICost_standard04&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; on &lt;SPAN style="color: #800000; font-size: 8pt;"&gt;cSource &lt;/SPAN&gt;&lt;/SPAN&gt;in the second two clauses.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=-(&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;cSource&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'OP'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;qTotalFCost&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; )&lt;BR /&gt;+&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;cCategory&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'Direct'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;qICost_standard04&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; )&lt;BR /&gt;+&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;cCategory&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'Indirect'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;qICost_standard04&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; )) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SQL I would just use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT qICost_standard04 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE cCategory = 'Direct'&lt;/P&gt;&lt;P&gt;AND cSource = 'OP'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have tried assorted variations of brackets and &amp;lt;&amp;gt; and just becoming frustrated.&lt;/P&gt;&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Geoff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 01 Nov 2012 15:30:39 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-11-01T15:30:39Z</dc:date>
    <item>
      <title>Where Expression Using Conditions on Two Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Expression-Using-Conditions-on-Two-Fields/m-p/392692#M146464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to create a variant on the following which also filters &lt;SPAN style="color: #800000; font-size: 8pt;"&gt;qICost_standard04&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; on &lt;SPAN style="color: #800000; font-size: 8pt;"&gt;cSource &lt;/SPAN&gt;&lt;/SPAN&gt;in the second two clauses.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=-(&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;cSource&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'OP'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;qTotalFCost&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; )&lt;BR /&gt;+&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;cCategory&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'Direct'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;qICost_standard04&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; )&lt;BR /&gt;+&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;cCategory&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'Indirect'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;qICost_standard04&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; )) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In SQL I would just use &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;SELECT qICost_standard04 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;WHERE cCategory = 'Direct'&lt;/P&gt;&lt;P&gt;AND cSource = 'OP'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have tried assorted variations of brackets and &amp;lt;&amp;gt; and just becoming frustrated.&lt;/P&gt;&lt;P&gt;Any help would be much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Geoff&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 15:30:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Expression-Using-Conditions-on-Two-Fields/m-p/392692#M146464</guid>
      <dc:creator />
      <dc:date>2012-11-01T15:30:39Z</dc:date>
    </item>
    <item>
      <title>Re: Where Expression Using Conditions on Two Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Expression-Using-Conditions-on-Two-Fields/m-p/392693#M146465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;try: Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;( {$&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;cSource&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'OP'}, &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;cCategory&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'Direct'}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;qICost_standard04&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; )&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;to get the sum of qlCost_standard04 where cSource = 'OP' and cCategory = 'Direct'&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;cCategory&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; = {'Direct','Indirect'} is the selector for the sql equivalent cCategory in ('Direct','Indirect')&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 15:39:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Expression-Using-Conditions-on-Two-Fields/m-p/392693#M146465</guid>
      <dc:creator>Gysbert_Wassenaar</dc:creator>
      <dc:date>2012-11-01T15:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Where Expression Using Conditions on Two Fields</title>
      <link>https://community.qlik.com/t5/QlikView/Where-Expression-Using-Conditions-on-Two-Fields/m-p/392694#M146466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cool, sorted thanks Gysbert&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 01 Nov 2012 16:20:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Where-Expression-Using-Conditions-on-Two-Fields/m-p/392694#M146466</guid>
      <dc:creator />
      <dc:date>2012-11-01T16:20:42Z</dc:date>
    </item>
  </channel>
</rss>

