<?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 question in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-question/m-p/286706#M499673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok, let's go one step further:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Sum({&amp;lt; Supplier =, Category = P({&amp;lt; Supplier = {$(=Concat(DISTINCT Supplier, chr(44)))} &amp;gt;}) &amp;gt;} Sales)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the set analysis modifier I now add the "Supplier =" that means "ignore the selection done in field Supplier". But it's later taken into account within the P() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small active_link" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: I've removed the quoting in the Concat() function since Supplier are numeric codes. But if they are not in actual data, quoting would be required as in my previous expression above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 14 Jun 2011 14:55:36 GMT</pubDate>
    <dc:creator>Miguel_Angel_Baeyens</dc:creator>
    <dc:date>2011-06-14T14:55:36Z</dc:date>
    <item>
      <title>Set Analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-question/m-p/286701#M499663</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 need help with a set analysis question. When I am selecting Supplier 1 in below example I want qlikview (in a graph) to summarize Sales for all categories that are related to Supplier 1 (see underlined Sales). Hence I want a column summarizing to 41 when I have selected Supplier 1.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What is the expression for that? Prefferably in a SET Analysis expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" style="width: 235px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl65" height="20" width="71"&gt;Supplier&lt;/TD&gt;&lt;TD class="xl65" width="86"&gt;Category&lt;/TD&gt;&lt;TD class="xl65" width="78"&gt;Sales&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;1&lt;/TD&gt;&lt;TD&gt;Shoes&lt;/TD&gt;&lt;TD align="right"&gt;&lt;SPAN style="text-decoration: underline;"&gt;10&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;1&lt;/TD&gt;&lt;TD&gt;T-Shirts&lt;/TD&gt;&lt;TD align="right"&gt;&lt;SPAN style="text-decoration: underline;"&gt;20&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;2&lt;/TD&gt;&lt;TD&gt;Balls&lt;/TD&gt;&lt;TD align="right"&gt;25&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;2&lt;/TD&gt;&lt;TD&gt;Shoes&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;&lt;SPAN style="text-decoration: underline;"&gt;5&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;2&lt;/TD&gt;&lt;TD&gt;Tennis&lt;/TD&gt;&lt;TD align="right"&gt;15&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;3&lt;/TD&gt;&lt;TD&gt;Tennis&lt;/TD&gt;&lt;TD align="right" class="xl64"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD align="right" height="20"&gt;3&lt;/TD&gt;&lt;TD&gt;T-Shirts&lt;/TD&gt;&lt;TD align="right" class="xl63"&gt;&lt;SPAN style="text-decoration: underline;"&gt;6&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christer Ekblad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2011 12:53:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-question/m-p/286701#M499663</guid>
      <dc:creator />
      <dc:date>2011-06-14T12:53:16Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-question/m-p/286702#M499664</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Christer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's one of the purposes P() element function in set analysis is for. If you create a new chart, straight or pivot table, with category as dimension and the following as expression you should get as expected:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Sum({&amp;lt; Category = P({&amp;lt; Supplier = {1} &amp;gt;}) &amp;gt;} Sales)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That reads something like "return the sum of all values in Sales where Category values corresponds to those Supplier 1 has". Kind of.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2011 13:03:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-question/m-p/286702#M499664</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-14T13:03:30Z</dc:date>
    </item>
    <item>
      <title>Set Analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-question/m-p/286703#M499666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi thanks for reply.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, what if I select supplier 2, then above does not work. How shouold I modify the above expression so that it is more dynamic and work for all selections i supplier?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(There might also be situations where I select several suppliers)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christer Ekblad&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2011 13:48:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-question/m-p/286703#M499666</guid>
      <dc:creator />
      <dc:date>2011-06-14T13:48:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-question/m-p/286704#M499668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Christer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you may use the following expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Sum({&amp;lt; Category = P({&amp;lt; Supplier = {'$(=Concat(DISTINCT Supplier, chr(39) &amp;amp; chr(44) &amp;amp; chr(39)))'} &amp;gt;}) &amp;gt;} Sales)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Concat part will return in the proper format (single quoted, comma separated) the values for Supplier you have selected. If no selection is done, then all possible values for Supplier are passed and all information should be displayed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2011 14:06:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-question/m-p/286704#M499668</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-14T14:06:35Z</dc:date>
    </item>
    <item>
      <title>Set Analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-question/m-p/286705#M499670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is not exactly what I am looking for.&lt;/P&gt;&lt;P&gt;If using &lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;CODE class="jive-code"&gt;Sum({&amp;lt; Category = P({&amp;lt; Supplier = {'$(=Concat(DISTINCT Supplier, chr(39) &amp;amp; chr(44) &amp;amp; chr(39)))'} &amp;gt;}) &amp;gt;} Sales)&lt;/CODE&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am getting 30 in sales when selecting supplier 1. I want it to be 41.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When selecting supplier 2 I want it to summarize to 58 (all shoes, balls and tennis).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think we are close but not quite there. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks a lot for your help, hope you have som emore suggestions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Christer&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2011 14:42:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-question/m-p/286705#M499670</guid>
      <dc:creator />
      <dc:date>2011-06-14T14:42:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-question/m-p/286706#M499673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Christer,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ok, let's go one step further:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_text_macro jive_macro_code"&gt;&lt;P&gt;Sum({&amp;lt; Supplier =, Category = P({&amp;lt; Supplier = {$(=Concat(DISTINCT Supplier, chr(44)))} &amp;gt;}) &amp;gt;} Sales)&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the set analysis modifier I now add the "Supplier =" that means "ignore the selection done in field Supplier". But it's later taken into account within the P() function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/people/mabaeyens" style="font-size: 12px; outline-style: none; padding-top: 1px; padding-bottom: 1px; padding-left: 17px; color: #007fc0; zoom: 1; background-position: no-repeat no-repeat;"&gt;Miguel Angel Baeyens&lt;/A&gt;&lt;/P&gt;&lt;P&gt;BI Consultant&lt;/P&gt;&lt;P&gt;&lt;A class="jive-link-external-small active_link" href="http://www.grupocomex.com/" style="font-size: 12px; outline-style: none; color: #007fc0;"&gt;Comex Grupo Ibérica&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;EDIT: I've removed the quoting in the Concat() function since Supplier are numeric codes. But if they are not in actual data, quoting would be required as in my previous expression above.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2011 14:55:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-question/m-p/286706#M499673</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-14T14:55:36Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-question/m-p/286707#M499674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;EM&gt;Hi Christer,&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Check the attached aplication.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;- Sridhar&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2011 15:13:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-question/m-p/286707#M499674</guid>
      <dc:creator />
      <dc:date>2011-06-14T15:13:44Z</dc:date>
    </item>
    <item>
      <title>Set Analysis question</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-question/m-p/286708#M499675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks alot both of you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2011 15:29:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-question/m-p/286708#M499675</guid>
      <dc:creator />
      <dc:date>2011-06-14T15:29:45Z</dc:date>
    </item>
  </channel>
</rss>

