<?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: Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/719561#M1085636</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; {&amp;lt; [Supplier Type] = {'A', 'B', 'C'}&amp;gt;}&lt;/SPAN&gt; Commission) + Sum ( {&amp;lt; [Supplier Type] = {'C'}&amp;gt;} Return)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;let me know&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 Jun 2014 15:00:16 GMT</pubDate>
    <dc:creator>alexandros17</dc:creator>
    <dc:date>2014-06-20T15:00:16Z</dc:date>
    <item>
      <title>Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/719560#M1085635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have fields 'Supplier Type' , 'Commission' and 'Return'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To calculate profit for supplier types A and B I just need 'Commission' but for suppler type C I need Commission and Return&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The set analysis I have used is&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(Commission) + Sum ( {&amp;lt; [Supplier Type] = {"C"}&amp;gt;} Return)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This works great when looking at all the suppliers but if I select type A or B it leaves the Return for type C in the calculation. What am I missing in my set analysis?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 14:57:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/719560#M1085635</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-20T14:57:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/719561#M1085636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; {&amp;lt; [Supplier Type] = {'A', 'B', 'C'}&amp;gt;}&lt;/SPAN&gt; Commission) + Sum ( {&amp;lt; [Supplier Type] = {'C'}&amp;gt;} Return)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;let me know&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 15:00:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/719561#M1085636</guid>
      <dc:creator>alexandros17</dc:creator>
      <dc:date>2014-06-20T15:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/719562#M1085637</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Isn't the first part the same as&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum ( {&amp;lt;[Supplier Type]=&amp;gt;} Commission)&lt;/P&gt;&lt;P&gt;This means I won't be able to select on supplier type A and see the profit on only that as its ignoring the selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to be able to select on type A and see only the profit related to that supplier type.&amp;nbsp; In my calculation I am seeing the commission for type A plus return for type C&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 15:07:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/719562#M1085637</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-20T15:07:52Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/719563#M1085638</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 15:39:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/719563#M1085638</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-20T15:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/719564#M1085639</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;how about something like:&lt;/P&gt;&lt;P&gt;= Sum(Commission) + if( index(getfieldselections([Supplier Type]), 'C')&amp;gt;0, Sum ( {&amp;lt; [Supplier Type] = {"C"}&amp;gt;} Return), 0)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this should work for any selection combinations of Supplier Type.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i know we are using an if condition...but this should give you a working solution for the time being.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 15:42:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/719564#M1085639</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-20T15:42:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/719565#M1085640</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could add the Supplier Type field a second time in your load script, and name the second copy of the data as ReturnSupplierType.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then use the expression&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(Commission) + Sum ( {&amp;lt; ReturnSupplierType = {"C"}&amp;gt;} Return)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will prevent selections in the Supplier Type field affecting sum(return)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 15:50:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/719565#M1085640</guid>
      <dc:creator>Colin-Albert</dc:creator>
      <dc:date>2014-06-20T15:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/719566#M1085641</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks.&amp;nbsp; It works!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Jun 2014 16:05:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis/m-p/719566#M1085641</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-06-20T16:05:16Z</dc:date>
    </item>
  </channel>
</rss>

