<?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 simple Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/simple-Set-Analysis/m-p/301509#M111609</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hello Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the quick response, but the numbers between the 2 expressions, the oriinal IF Query and the one using Set Analysis doesnt match. I also tried storing this caluclation in a Variable and using it.. do you have any more ideas please??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(Deal_Stage='DIPs',num(sum(Value* WA_LTV)) / sum(if(WA_LTV &amp;lt;= 0,0,Value)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;=sum({&amp;lt; Deal_Stage = {'DIPs'} &amp;gt;} Value * WA_LTV) / sum({&amp;lt; WA_LTV = {"&amp;lt;=0"} &amp;gt;} Value)&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;There is a difference in the result between these above 2 expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&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>Mon, 20 Jun 2011 09:00:56 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-06-20T09:00:56Z</dc:date>
    <item>
      <title>simple Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/simple-Set-Analysis/m-p/301506#M111606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a simple query, just that I am unable to get my head around with this.. please help me out with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(Deal_Stage='DIPs',num(sum(Value* WA_LTV)) / sum(if(WA_LTV &amp;lt;= 0,0,Value))) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to write this using set analysis&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in Advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 08:33:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simple-Set-Analysis/m-p/301506#M111606</guid>
      <dc:creator />
      <dc:date>2011-06-20T08:33:45Z</dc:date>
    </item>
    <item>
      <title>simple Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/simple-Set-Analysis/m-p/301507#M111607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; ???? Anybody?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 08:46:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simple-Set-Analysis/m-p/301507#M111607</guid>
      <dc:creator />
      <dc:date>2011-06-20T08:46:28Z</dc:date>
    </item>
    <item>
      <title>Re: simple Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/simple-Set-Analysis/m-p/301508#M111608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the following&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; Deal_Stage = {'DIPs'} &amp;gt;} Value * WA_LTV) / sum({&amp;lt; WA_LTV = {"&amp;lt;=0"} &amp;gt;} Value)&lt;/P&gt;&lt;/PRE&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>Mon, 20 Jun 2011 08:48:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simple-Set-Analysis/m-p/301508#M111608</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-20T08:48:16Z</dc:date>
    </item>
    <item>
      <title>simple Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/simple-Set-Analysis/m-p/301509#M111609</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hello Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the quick response, but the numbers between the 2 expressions, the oriinal IF Query and the one using Set Analysis doesnt match. I also tried storing this caluclation in a Variable and using it.. do you have any more ideas please??&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(Deal_Stage='DIPs',num(sum(Value* WA_LTV)) / sum(if(WA_LTV &amp;lt;= 0,0,Value)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;CODE class="jive-code"&gt;=sum({&amp;lt; Deal_Stage = {'DIPs'} &amp;gt;} Value * WA_LTV) / sum({&amp;lt; WA_LTV = {"&amp;lt;=0"} &amp;gt;} Value)&lt;BR /&gt;&lt;/CODE&gt;&lt;/P&gt;&lt;P&gt;There is a difference in the result between these above 2 expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&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>Mon, 20 Jun 2011 09:00:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simple-Set-Analysis/m-p/301509#M111609</guid>
      <dc:creator />
      <dc:date>2011-06-20T09:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: simple Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/simple-Set-Analysis/m-p/301510#M111610</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;They usually return different results when using If() than when using set analysis. The set analysis is calculated once for the whole chart, and the If() is evaluated for each row (for each value of the dimension). This is one of the reasons why set analysis is faster than if(). Anyway sometimes there's no other way to get the results you expect but using if()'s.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my expression above I converted the if() to a set analysis, but I made a mistake in the modifier&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;&lt;CODE class="jive-code"&gt;=sum({&amp;lt; Deal_Stage = {'DIPs'} &amp;gt;} Value * WA_LTV) / sum({&amp;lt; WA_LTV = {"&amp;gt;0"} &amp;gt;} Value)&lt;/CODE&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That should be more similar to what you expect (the WA_LTV in the second Sum() is set to greater than zero, as in your conditional).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Post some sample data and the expected results and the type of object you are using (pivot table, straight table) so we can check further if the above doesn't help.&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>Mon, 20 Jun 2011 09:16:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simple-Set-Analysis/m-p/301510#M111610</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-06-20T09:16:41Z</dc:date>
    </item>
    <item>
      <title>simple Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/simple-Set-Analysis/m-p/301511#M111611</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Hello Miguel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For now this looks like a temporary solution for me,.. wish I could have sent some sample data, but cannot as its confidential. Anyways I will get back to you for sure if i need more info.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Again for your time and effort.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Jun 2011 10:40:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/simple-Set-Analysis/m-p/301511#M111611</guid>
      <dc:creator />
      <dc:date>2011-06-20T10:40:11Z</dc:date>
    </item>
  </channel>
</rss>

