<?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 Sum to count results within a text box in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Sum-to-count-results-within-a-text-box/m-p/2010910#M83591</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I am trying to add two count results in combination of text but I can't get it to work.&lt;/P&gt;
&lt;P&gt;Simply stated: three lines, first two apple counts have special attributes and the third line will just need to ADD/SUM the first two counts.&lt;/P&gt;
&lt;P&gt;=&lt;BR /&gt;&lt;SPAN&gt;'Red Sweet Apples: ' &amp;amp;Count({$&amp;lt;taste={'sweet'},color={'red'}&amp;gt;}apples) &amp;amp;CHR(10) &amp;amp;&lt;BR /&gt;&lt;/SPAN&gt;'Green Sour Apples: ' &amp;amp;&lt;SPAN&gt;Count({$&amp;lt;taste={'sour'},color={'green'}&amp;gt;}apples) &amp;amp; CHR(10) &amp;amp;&lt;BR /&gt;'Total Apples: ' &amp;amp;Count({$&amp;lt;taste={'sweet'},color={'red'}&amp;gt;}apples) &lt;STRONG&gt;+&lt;/STRONG&gt; Count({$&amp;lt;taste={'sour'},color={'green'}&amp;gt;}apples)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Nov 2022 12:46:32 GMT</pubDate>
    <dc:creator>MrBosch</dc:creator>
    <dc:date>2022-11-30T12:46:32Z</dc:date>
    <item>
      <title>Sum to count results within a text box</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-to-count-results-within-a-text-box/m-p/2010910#M83591</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I am trying to add two count results in combination of text but I can't get it to work.&lt;/P&gt;
&lt;P&gt;Simply stated: three lines, first two apple counts have special attributes and the third line will just need to ADD/SUM the first two counts.&lt;/P&gt;
&lt;P&gt;=&lt;BR /&gt;&lt;SPAN&gt;'Red Sweet Apples: ' &amp;amp;Count({$&amp;lt;taste={'sweet'},color={'red'}&amp;gt;}apples) &amp;amp;CHR(10) &amp;amp;&lt;BR /&gt;&lt;/SPAN&gt;'Green Sour Apples: ' &amp;amp;&lt;SPAN&gt;Count({$&amp;lt;taste={'sour'},color={'green'}&amp;gt;}apples) &amp;amp; CHR(10) &amp;amp;&lt;BR /&gt;'Total Apples: ' &amp;amp;Count({$&amp;lt;taste={'sweet'},color={'red'}&amp;gt;}apples) &lt;STRONG&gt;+&lt;/STRONG&gt; Count({$&amp;lt;taste={'sour'},color={'green'}&amp;gt;}apples)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 12:46:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-to-count-results-within-a-text-box/m-p/2010910#M83591</guid>
      <dc:creator>MrBosch</dc:creator>
      <dc:date>2022-11-30T12:46:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sum to count results within a text box</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-to-count-results-within-a-text-box/m-p/2010921#M83592</link>
      <description>&lt;P&gt;Perhaps try using RangeSum() on the two counts, rather than straight addition? Or just write it as a single count with a union of sets?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 12:59:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-to-count-results-within-a-text-box/m-p/2010921#M83592</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-11-30T12:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Sum to count results within a text box</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-to-count-results-within-a-text-box/m-p/2010926#M83593</link>
      <description>&lt;P&gt;I would love to try that Or, but I have no clue how to use your solution... Sorry.&lt;/P&gt;
&lt;P&gt;I will try to find it searching for these key words though. Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 13:07:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-to-count-results-within-a-text-box/m-p/2010926#M83593</guid>
      <dc:creator>MrBosch</dc:creator>
      <dc:date>2022-11-30T13:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: Sum to count results within a text box</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-to-count-results-within-a-text-box/m-p/2010929#M83594</link>
      <description>&lt;P&gt;&lt;SPAN&gt;RangeSum(Count({$&amp;lt;taste={'sweet'},color={'red'}&amp;gt;}apples) &lt;STRONG&gt;,&lt;/STRONG&gt;Count({$&amp;lt;taste={'sour'},color={'green'}&amp;gt;}apples) )&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I believe the set union syntax would be:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Count({$&amp;lt;taste={'sweet'},color={'red'}&amp;gt; + &amp;lt;taste={'sour'},color={'green'}&amp;gt; }apples) &lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 13:15:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-to-count-results-within-a-text-box/m-p/2010929#M83594</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-11-30T13:15:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sum to count results within a text box</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-to-count-results-within-a-text-box/m-p/2010933#M83595</link>
      <description>&lt;P&gt;Got it: union of sets&lt;/P&gt;
&lt;P&gt;For those who are interested:&lt;/P&gt;
&lt;P&gt;=count({&amp;lt;EXP1&amp;gt; + &amp;lt;EXP2&amp;gt;} apples)&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;So:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Red Sweet Apples: ' &amp;amp;Count({$&amp;lt;taste={'sweet'},color={'red'}&amp;gt;}apples) &amp;amp;CHR(10) &amp;amp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;'Green Sour Apples: ' &amp;amp;&lt;/SPAN&gt;&lt;SPAN&gt;Count({$&amp;lt;taste={'sour'},color={'green'}&amp;gt;}apples) &amp;amp; CHR(10) &amp;amp;&lt;BR /&gt;'Total Apples: ' &amp;amp;Count({$&amp;lt;&lt;STRONG&gt;taste={'sweet'},color={'red'} + {'sour'},color={'green'}&lt;/STRONG&gt;&amp;gt;}apples) &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Thanks Or for pointing me in the right direction! &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Never thought it would be so difficult to just sum two numbers though... since it will not solve any question like:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;= 'Total fruit: ' &amp;amp; count (apples) + count (pears)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 13:16:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-to-count-results-within-a-text-box/m-p/2010933#M83595</guid>
      <dc:creator>MrBosch</dc:creator>
      <dc:date>2022-11-30T13:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Sum to count results within a text box</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-to-count-results-within-a-text-box/m-p/2010936#M83596</link>
      <description>&lt;P&gt;It would be more robust if you used RangeSum() rather than straight addition, if you do need to handle apples and pears. I believe you could also simply use parenthesis to tell Qlik how to parse this:&lt;/P&gt;
&lt;P&gt;'1 + 1 = ' &amp;amp; (1+1)&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 13:20:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-to-count-results-within-a-text-box/m-p/2010936#M83596</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-11-30T13:20:09Z</dc:date>
    </item>
    <item>
      <title>Re: Sum to count results within a text box</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-to-count-results-within-a-text-box/m-p/2010955#M83600</link>
      <description>&lt;P&gt;Hmm... That puts me back where I started:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;='1 + 1 = ' &amp;amp; (1+1)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Is exactly what I am trying to achieve: the easy way.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;So now let's assume: ='1 + 1 = ' &amp;amp; (A+B)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I substitute &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;A= Count({$&amp;lt;taste={'sweet'},color={'red'}&amp;gt;}apples)&lt;BR /&gt;B= Count({$&amp;lt;taste={'sour  '},color={'green'}&amp;gt;}apples)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;and Qlikview seems not to be able to handle it.  &lt;SPAN class="lia-emoticons-autosuggestions"&gt;&lt;SPAN class="lia-emoticons-search-term"&gt;:-S&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 13:47:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-to-count-results-within-a-text-box/m-p/2010955#M83600</guid>
      <dc:creator>MrBosch</dc:creator>
      <dc:date>2022-11-30T13:47:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sum to count results within a text box</title>
      <link>https://community.qlik.com/t5/App-Development/Sum-to-count-results-within-a-text-box/m-p/2010970#M83602</link>
      <description>&lt;P&gt;Okay, sorry. Must have been a typo or something... (I couldn't imagine QV would not be able to handle it).&lt;/P&gt;
&lt;P&gt;So if you combine text and want to add (or sum) two calculations:&lt;/P&gt;
&lt;P&gt;= 'Result of two expressions: ' &lt;STRONG&gt;&amp;amp;(count A + count B)&lt;/STRONG&gt; &amp;amp; 'some more text' &amp;amp;CHR(10)&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;so: (count A = count B) is:&lt;/P&gt;
&lt;P&gt;&amp;amp;(Count({$&amp;lt;weight={"&amp;gt;80"},type={'apples'}&amp;gt;}fruit) + Count({$&amp;lt;weight={"&amp;gt;94"},type={'pears'}&amp;gt;}fruit))&lt;/P&gt;
&lt;P&gt; &lt;/P&gt;
&lt;P&gt;Thanks &lt;STRONG&gt;Or&lt;/STRONG&gt; for helping me getting there!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Nov 2022 14:00:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Sum-to-count-results-within-a-text-box/m-p/2010970#M83602</guid>
      <dc:creator>MrBosch</dc:creator>
      <dc:date>2022-11-30T14:00:40Z</dc:date>
    </item>
  </channel>
</rss>

