<?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 with if in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/set-analysis-with-if/m-p/454911#M562723</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't seem to ask a question in your post, but based on the subject I assume you want to know how to do a conditional sum?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set analysis limits (or extends) the set of data the formula is working on, so that's not the way to go here. If is the function you want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13613714006412854" jivemacro_uid="_13613714006412854"&gt;&lt;P&gt;=SUM(IF(FieldA&amp;gt;0,FieldB,FieldC))&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This wil check the value of Field A for each record and if it is greater than 0 it will add FieldB to the total sum, else Field C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that answers the question you didn't ask &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Feb 2013 14:45:21 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-02-20T14:45:21Z</dc:date>
    <item>
      <title>set analysis with if</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-with-if/m-p/454909#M562721</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;i have a field with values greater and less than 0.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so, i need to make a set analysis where if the value of A is greater than 0 is sum with a field B, and if it's less than 0 is sum with a field C.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 14:33:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-with-if/m-p/454909#M562721</guid>
      <dc:creator />
      <dc:date>2013-02-20T14:33:23Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis with if</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-with-if/m-p/454910#M562722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No need for an if statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum({&amp;lt;A = {"&amp;gt;0"}&amp;gt;} B) + Sum({&amp;lt;A = {"&amp;lt;0"}&amp;gt;} C)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jonathan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 14:38:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-with-if/m-p/454910#M562722</guid>
      <dc:creator>jonathandienst</dc:creator>
      <dc:date>2013-02-20T14:38:23Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis with if</title>
      <link>https://community.qlik.com/t5/QlikView/set-analysis-with-if/m-p/454911#M562723</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You don't seem to ask a question in your post, but based on the subject I assume you want to know how to do a conditional sum?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set analysis limits (or extends) the set of data the formula is working on, so that's not the way to go here. If is the function you want:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_text_macro jive_macro_code _jivemacro_uid_13613714006412854" jivemacro_uid="_13613714006412854"&gt;&lt;P&gt;=SUM(IF(FieldA&amp;gt;0,FieldB,FieldC))&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This wil check the value of Field A for each record and if it is greater than 0 it will add FieldB to the total sum, else Field C&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that answers the question you didn't ask &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2013 14:45:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/set-analysis-with-if/m-p/454911#M562723</guid>
      <dc:creator />
      <dc:date>2013-02-20T14:45:21Z</dc:date>
    </item>
  </channel>
</rss>

