<?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: Sum multiple Sum-Set analysis statements in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-multiple-Sum-Set-analysis-statements/m-p/1159530#M377967</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the value truly 0, or is it null? If it is Null, you can 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; font-size: 13px;"&gt;&lt;STRONG&gt;Sum({$&amp;lt;[Resource Type] = {'Retained'}&amp;gt;} Alt(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[#Hours Billed], &lt;/SPAN&gt;[#Hours Worked]) * #Rate)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or may be this if it is 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum({$&amp;lt;[Resource Type] = {'Retained'}&amp;gt;} If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[#Hours Billed] = 0, &lt;/SPAN&gt;[#Hours Worked], &lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[#Hours Billed]&lt;/STRONG&gt;) * #Rate)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 09 Aug 2016 20:18:26 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-08-09T20:18:26Z</dc:date>
    <item>
      <title>Sum multiple Sum-Set analysis statements</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-multiple-Sum-Set-analysis-statements/m-p/1159529#M377966</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 think I'm misunderstanding the capabilities of Set Analysis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using this expression:&lt;/P&gt;&lt;P&gt;(sum({$&amp;lt;[Resource Type] = {'Retained'},[#Hours Billed]={0},[#Hours Worked]-={0}&amp;gt;} [#Hours Worked] * #Rate)&lt;/P&gt;&lt;P&gt;+sum({$&amp;lt;[Resource Type] = {'Retained'},[#Hours Worked]={0},[#Hours Billed]-={0}&amp;gt;} [#Hours Billed] * #Rate)&lt;/P&gt;&lt;P&gt;+sum({$&amp;lt;[Resource Type] = {'Retained'},[#Hours Worked]-={0},[#Hours Billed]-={0}&amp;gt;} [#Hours Billed] * #Rate))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To aggregate these calculations based on the Set Modifier conditions.&amp;nbsp; I tried using the above expression to create three different sets (Exclusive of one another) of data - combine them - and then sum the value returned.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1st set where the Hours Billed are 0 and the Hours worked are not 0 - sum(Hours Worked*Rate)&lt;/P&gt;&lt;P&gt;2nd &lt;SPAN style="font-size: 13.3333px;"&gt;set where the Hours Worked are 0 and the Hours Billed are not 0 - sum(Hours Billed*Rate)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;3rd set where the Hours Worked are not 0 and the Hours Billed are not 0 - sum(HoursBilled*Rate) &lt;/SPAN&gt;&lt;EM style="font-size: 13.3333px;"&gt;Hours billed takes precedence here&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Finally, I wished to sum all the values returned from these three sets. Am I misunderstanding the capabilities of Set Analysis or the &lt;EM&gt;underlying&lt;/EM&gt; logic behind it? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If anyone could give me some direction that would be great!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Channing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2016 19:26:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-multiple-Sum-Set-analysis-statements/m-p/1159529#M377966</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-09T19:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Sum multiple Sum-Set analysis statements</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-multiple-Sum-Set-analysis-statements/m-p/1159530#M377967</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is the value truly 0, or is it null? If it is Null, you can 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; font-size: 13px;"&gt;&lt;STRONG&gt;Sum({$&amp;lt;[Resource Type] = {'Retained'}&amp;gt;} Alt(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[#Hours Billed], &lt;/SPAN&gt;[#Hours Worked]) * #Rate)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or may be this if it is 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum({$&amp;lt;[Resource Type] = {'Retained'}&amp;gt;} If(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[#Hours Billed] = 0, &lt;/SPAN&gt;[#Hours Worked], &lt;STRONG style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;[#Hours Billed]&lt;/STRONG&gt;) * #Rate)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 Aug 2016 20:18:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-multiple-Sum-Set-analysis-statements/m-p/1159530#M377967</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-09T20:18:26Z</dc:date>
    </item>
  </channel>
</rss>

