<?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: Qlik Change count to Sum in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Qlik-Change-count-to-Sum/m-p/1880717#M72582</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;If my understanding is correct, then you are trying to sum all the values of the field &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;IsOpen&lt;/STRONG&gt;&lt;/SPAN&gt;, where the &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Teams &lt;/STRONG&gt;&lt;/SPAN&gt;field equals to &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;'Help Desk Support'&lt;/STRONG&gt;&lt;/SPAN&gt; and the&amp;nbsp;&lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;YearBL &lt;/STRONG&gt;&lt;/SPAN&gt;field equals to &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;2022&lt;/STRONG&gt;&lt;/SPAN&gt;, which is the current year.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;If you are getting unexpected results with your expressions, one recommendation is to always test the expressions in a new app with a new simple dataset. Preferably less records, where you can see clearly what exactly is your expected output and as soon as you make the expression work there, you can transfer it to your original application.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;On my side, I have followed the steps below:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;1. I have used a simple dataset with few values:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCREENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/04cfa3fa-cabc-4255-9a4c-ac5f92d43598.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;2. The green values are the one that interests us and based on the requirements that you have provided, we need to sum the values &lt;STRONG&gt;30 &lt;/STRONG&gt;and &lt;STRONG&gt;40&lt;/STRONG&gt;, since those are the only values where &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Teams &lt;/STRONG&gt;&lt;/SPAN&gt;= &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;Help Desk Support&lt;/STRONG&gt;&lt;/SPAN&gt; and at the same time &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;YearBl &lt;/STRONG&gt;&lt;/SPAN&gt;= &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;2022&lt;/STRONG&gt;&lt;/SPAN&gt;. Therefore, the expected output is &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;30+40=70&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;3. Now I have loaded the data in Qlik Sense:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCREENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/bd35e66f-d508-46a2-809f-3de9b5d671f6.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;4. And I have created an &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;KPI &lt;/STRONG&gt;&lt;/SPAN&gt;chart with expression: &lt;STRONG&gt;=&lt;SPAN style="color:#2980b9"&gt;Sum&lt;/SPAN&gt;( {&amp;lt;&lt;SPAN style="color:#f39c12"&gt;Teams&lt;/SPAN&gt;={&lt;SPAN style="color:#27ae60"&gt;'Help Desk Support'&lt;/SPAN&gt;}, &lt;SPAN style="color:#f39c12"&gt;YearBL&lt;/SPAN&gt;={&lt;SPAN style="color:#27ae60"&gt;'$(vCurrentYear)'&lt;/SPAN&gt;}&amp;gt;}&amp;nbsp;&lt;SPAN style="color:#f39c12"&gt;IsOpen&amp;nbsp;&lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCRENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/aa3aa3b7-df29-4fbb-8e98-824fc06fd0d1.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;As you can see, the KPI is 70, which means that the expression is working as expected.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color:#7f8c8d"&gt;&lt;EM&gt;&lt;STRONG&gt;I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members.&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;
&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jan 2022 14:28:01 GMT</pubDate>
    <dc:creator>Andrei_Cusnir</dc:creator>
    <dc:date>2022-01-13T14:28:01Z</dc:date>
    <item>
      <title>Qlik Change  count to Sum</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Change-count-to-Sum/m-p/1879079#M72474</link>
      <description>&lt;P&gt;How can I turn this set analysis to sum instead of count?&lt;/P&gt;
&lt;P&gt;Every way I try it does not return the right amount.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am trying to sum the IsOpen but I need it to sum for only the Help Desk Support and for the year 2022.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Count({$&amp;lt;IsOpen, Teams = {'Help Desk Support'}, YearBL = {'$(vCurrentYear)'}&amp;gt;} distinct RequestID)&lt;/P&gt;
&lt;P&gt;Thanks for your help.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 10 Jan 2022 16:21:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Change-count-to-Sum/m-p/1879079#M72474</guid>
      <dc:creator>CrysiiD_BI</dc:creator>
      <dc:date>2022-01-10T16:21:27Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Change count to Sum</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Change-count-to-Sum/m-p/1880717#M72582</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;If my understanding is correct, then you are trying to sum all the values of the field &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;IsOpen&lt;/STRONG&gt;&lt;/SPAN&gt;, where the &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Teams &lt;/STRONG&gt;&lt;/SPAN&gt;field equals to &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;'Help Desk Support'&lt;/STRONG&gt;&lt;/SPAN&gt; and the&amp;nbsp;&lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;YearBL &lt;/STRONG&gt;&lt;/SPAN&gt;field equals to &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;2022&lt;/STRONG&gt;&lt;/SPAN&gt;, which is the current year.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;If you are getting unexpected results with your expressions, one recommendation is to always test the expressions in a new app with a new simple dataset. Preferably less records, where you can see clearly what exactly is your expected output and as soon as you make the expression work there, you can transfer it to your original application.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;On my side, I have followed the steps below:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;1. I have used a simple dataset with few values:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCREENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/04cfa3fa-cabc-4255-9a4c-ac5f92d43598.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;2. The green values are the one that interests us and based on the requirements that you have provided, we need to sum the values &lt;STRONG&gt;30 &lt;/STRONG&gt;and &lt;STRONG&gt;40&lt;/STRONG&gt;, since those are the only values where &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Teams &lt;/STRONG&gt;&lt;/SPAN&gt;= &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;Help Desk Support&lt;/STRONG&gt;&lt;/SPAN&gt; and at the same time &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;YearBl &lt;/STRONG&gt;&lt;/SPAN&gt;= &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;2022&lt;/STRONG&gt;&lt;/SPAN&gt;. Therefore, the expected output is &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;30+40=70&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;3. Now I have loaded the data in Qlik Sense:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCREENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/bd35e66f-d508-46a2-809f-3de9b5d671f6.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;4. And I have created an &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;KPI &lt;/STRONG&gt;&lt;/SPAN&gt;chart with expression: &lt;STRONG&gt;=&lt;SPAN style="color:#2980b9"&gt;Sum&lt;/SPAN&gt;( {&amp;lt;&lt;SPAN style="color:#f39c12"&gt;Teams&lt;/SPAN&gt;={&lt;SPAN style="color:#27ae60"&gt;'Help Desk Support'&lt;/SPAN&gt;}, &lt;SPAN style="color:#f39c12"&gt;YearBL&lt;/SPAN&gt;={&lt;SPAN style="color:#27ae60"&gt;'$(vCurrentYear)'&lt;/SPAN&gt;}&amp;gt;}&amp;nbsp;&lt;SPAN style="color:#f39c12"&gt;IsOpen&amp;nbsp;&lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="SCRENSHOT" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/aa3aa3b7-df29-4fbb-8e98-824fc06fd0d1.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;As you can see, the KPI is 70, which means that the expression is working as expected.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color:#7f8c8d"&gt;&lt;EM&gt;&lt;STRONG&gt;I hope that this information was helpful. In case I have misunderstood the use case scenario, please elaborate in details by providing additional information. However, if it has helped you resolve the issue, please mark it as accepted solution to give further visibility to other community members.&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;BR /&gt;
&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jan 2022 14:28:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Change-count-to-Sum/m-p/1880717#M72582</guid>
      <dc:creator>Andrei_Cusnir</dc:creator>
      <dc:date>2022-01-13T14:28:01Z</dc:date>
    </item>
  </channel>
</rss>

