<?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 - Sum in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Sum/m-p/1144826#M908507</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To answer this, you would need to give some more information how the fields involved are related / linked in your data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Coudl you give a short overview of how your data model looks like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jun 2016 20:59:15 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-06-17T20:59:15Z</dc:date>
    <item>
      <title>Set Analysis - Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Sum/m-p/1144822#M908503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Hello, &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I created a text object and want to show the "Total Late Cases" number.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;So I add this code into "General -- &amp;gt; Text" : &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;='Total Late Cases: ' &amp;amp;&amp;nbsp; &lt;SPAN style="color: #0000ff;"&gt;sum&lt;/SPAN&gt;( { $ &amp;lt;(&lt;SPAN style="color: #800000;"&gt;DUE_DATE&lt;/SPAN&gt; - &lt;SPAN style="color: #800000;"&gt;DATE_SUBMITTED&lt;/SPAN&gt;) = {&lt;SPAN style="color: #800000;"&gt;"&amp;lt;0"&lt;/SPAN&gt;} &amp;gt; } &lt;SPAN style="color: #800000;"&gt;[Submission Count]&lt;/SPAN&gt;)&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;I am expecting above code can return the sum of [Submission Count] which will be the numeric result less than zero. &lt;/SPAN&gt;&lt;SPAN style="font-size: 12pt;"&gt;But it show error. I am not sure where it has issues with.&amp;nbsp; Can you point out if you find any problems?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12pt;"&gt;Becky&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Sum/m-p/1144822#M908503</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Sum/m-p/1144823#M908504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can only use field names left of the equal sign of a set analysis field modifier. &lt;/P&gt;&lt;P&gt;You are using an expression (subtracting two fields).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;='Total Late Cases: ' &amp;amp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;( If [&lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;DUE_DATE]&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt; - [&lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;DATE_SUBMITTED] &lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;&amp;lt;0,&lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Submission Count]&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&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; font-size: 16px;"&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; font-size: 16px;"&gt;If you need to do a row based comparison, then you can only use set analysis if you find a key field that is granular enough for the comparison to be unambiguous, maybe a CaseID.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&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; font-size: 16px;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;='Total Late Cases: ' &amp;amp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;( {&amp;lt;CaseID = {"=&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;[&lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;DUE_DATE]&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt; &amp;lt; [&lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;DATE_SUBMITTED]&lt;/SPAN&gt;"}&amp;gt;} &lt;/SPAN&gt;&lt;SPAN style="font-size: 16px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #800000;"&gt;[Submission Count]&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 20:35:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Sum/m-p/1144823#M908504</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-17T20:35:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Sum/m-p/1144824#M908505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! It works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure about "I can only use field names left of the equal sign". Does that mean if there are more than one field involved, then I will need to use expression or the second solution you provided?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; have a great weekend.&lt;/P&gt;&lt;P&gt;Becky&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 20:50:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Sum/m-p/1144824#M908505</guid>
      <dc:creator />
      <dc:date>2016-06-17T20:50:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Sum/m-p/1144825#M908506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The more interesting thing is I tried to use two of your solutions. But the results are totally different. The result from the first solution returned 8 times greater than the second solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What could be the reason? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 20:53:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Sum/m-p/1144825#M908506</guid>
      <dc:creator />
      <dc:date>2016-06-17T20:53:47Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Sum/m-p/1144826#M908507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To answer this, you would need to give some more information how the fields involved are related / linked in your data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Coudl you give a short overview of how your data model looks like?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 20:59:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Sum/m-p/1144826#M908507</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-17T20:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Sum/m-p/1144827#M908508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are two tables in my data model layer. They are connected by Case_ID but have different data fields. There is no join or cancatenate in the data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used Case year, quarter and month from Table A, and Du Date, Date Submitted from Table B. Try to get "Late Days", how many late cases, total cases.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am not sure if this is enough information for you to think through? Please let me know your thoughts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Becky &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 21:10:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Sum/m-p/1144827#M908508</guid>
      <dc:creator />
      <dc:date>2016-06-17T21:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: Set Analysis - Sum</title>
      <link>https://community.qlik.com/t5/QlikView/Set-Analysis-Sum/m-p/1144828#M908509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I am not sure about "I can only use field names left of the equal sign". Does that mean if there are more than one field involved, then I will need to use expression or the second solution you provided?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;You probably know that you can make selections only on field values, so even if you create e.g. a more complex field expression in a list box, the selections are made on field values in your data model (you see the selections e.g. when looking at the Current Selections Box).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set Analysis is basically the developers tool to create selections to be used in the context of an aggregation function.&lt;/P&gt;&lt;P&gt;Still, you can only use selections on field values. Hence only field names allowed on the left of the equal sign (which is not a comparison operator, but more like an assignment operator).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-blogpost/4076"&gt;A Primer on Set Analysis&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2016 21:13:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-Analysis-Sum/m-p/1144828#M908509</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-06-17T21:13:27Z</dc:date>
    </item>
  </channel>
</rss>

