<?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 Set Analysis with &amp;quot;OR&amp;quot; in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-quot-OR-quot/m-p/220374#M499939</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simple problem, hopefully simple solution.&lt;/P&gt;&lt;P&gt;I have a sales table, each sale has two salespeople. Using set analysis the equation for one salesperson is something like&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Salesperson1 = {"$(=getfieldselections(SalesPerson))"} SalesAmount)&lt;/P&gt;&lt;P&gt;That part works fine. However I'd like to do something like&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Salesperson1 = {"$(=getfieldselections(SalesPerson))"} &lt;STRONG&gt;OR&lt;/STRONG&gt; Salesperson2 = {"$(=getfieldselections(SalesPerson))"} SalesAmount)&lt;/P&gt;&lt;P&gt;Any suggestions on the syntax to make the "OR" work?&lt;/P&gt;&lt;P&gt;Thanks, Dave.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Apr 2011 15:58:46 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-18T15:58:46Z</dc:date>
    <item>
      <title>Set Analysis with "OR"</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-quot-OR-quot/m-p/220374#M499939</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Simple problem, hopefully simple solution.&lt;/P&gt;&lt;P&gt;I have a sales table, each sale has two salespeople. Using set analysis the equation for one salesperson is something like&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Salesperson1 = {"$(=getfieldselections(SalesPerson))"} SalesAmount)&lt;/P&gt;&lt;P&gt;That part works fine. However I'd like to do something like&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Salesperson1 = {"$(=getfieldselections(SalesPerson))"} &lt;STRONG&gt;OR&lt;/STRONG&gt; Salesperson2 = {"$(=getfieldselections(SalesPerson))"} SalesAmount)&lt;/P&gt;&lt;P&gt;Any suggestions on the syntax to make the "OR" work?&lt;/P&gt;&lt;P&gt;Thanks, Dave.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Apr 2011 15:58:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-quot-OR-quot/m-p/220374#M499939</guid>
      <dc:creator />
      <dc:date>2011-04-18T15:58:46Z</dc:date>
    </item>
    <item>
      <title>Re. :Set Analysis with "OR"</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-quot-OR-quot/m-p/220375#M499940</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try this :&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Salesperson1 = {"$(=getfieldselections(SalesPerson))"}&amp;gt;} SalesAmount) + sum({&amp;lt; Salesperson2 = {"$(=getfieldselections(SalesPerson))"}&amp;gt;} SalesAmount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Vincent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Apr 2011 16:10:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-quot-OR-quot/m-p/220375#M499940</guid>
      <dc:creator>vincent_ardiet</dc:creator>
      <dc:date>2011-04-18T16:10:38Z</dc:date>
    </item>
    <item>
      <title>Set Analysis with "OR"</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-quot-OR-quot/m-p/220376#M499942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can create a union the the sets&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Salesperson1 = {"$(=getfieldselections(SalesPerson))"} &amp;gt;+&amp;lt; Salesperson2 = {"$(=getfieldselections(SalesPerson))"} &amp;gt;} SalesAmount)&lt;/P&gt;&lt;P&gt;This way you will not count a sale twice (if salesperson1 and 2 are in SalesPerson)&lt;/P&gt;&lt;P&gt;You can also try to use p() function:&lt;/P&gt;&lt;P&gt;sum({&amp;lt; Salesperson1 =p(SalesPerson) &amp;gt;+&amp;lt; Salesperson2 =p(SalesPerson) &amp;gt;} SalesAmount)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Apr 2011 16:34:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-quot-OR-quot/m-p/220376#M499942</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-04-18T16:34:22Z</dc:date>
    </item>
    <item>
      <title>Set Analysis with "OR"</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-quot-OR-quot/m-p/220377#M499943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Erick, I just happened to stumble into the answer as well. This is the perfect result.&lt;/P&gt;&lt;P&gt;Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Apr 2011 17:50:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-quot-OR-quot/m-p/220377#M499943</guid>
      <dc:creator />
      <dc:date>2011-04-18T17:50:47Z</dc:date>
    </item>
    <item>
      <title>Re. :Set Analysis with "OR"</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-with-quot-OR-quot/m-p/220378#M499944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Vincent -&lt;/P&gt;&lt;P&gt;Thanks for the quick reply, however what happens with your solution is that you are actually doubling the result in the event both Salesperson1 and Salesperson2 are the same person. You effectively are creating an "And" statement, not using the exclusion benefits of an "Or" statement.&lt;/P&gt;&lt;P&gt;Thanks, Dave&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Apr 2011 17:53:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-with-quot-OR-quot/m-p/220378#M499944</guid>
      <dc:creator />
      <dc:date>2011-04-18T17:53:28Z</dc:date>
    </item>
  </channel>
</rss>

