<?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: use if-statement in a count function in Reporting Service &amp; Alerting</title>
    <link>https://community.qlik.com/t5/Reporting-Service-Alerting/use-if-statement-in-a-count-function/m-p/1955913#M293</link>
    <description>&lt;P&gt;It looks like you might want to create a table or graph with modulo being the dimension and count(item) being the measure?&lt;/P&gt;
&lt;P&gt;If this needs to be done script-side instead, perhaps:&lt;/P&gt;
&lt;P&gt;Load modulo, count(item) as myCount&lt;/P&gt;
&lt;P&gt;From YourTable&lt;/P&gt;
&lt;P&gt;Group by modulo;&lt;/P&gt;</description>
    <pubDate>Thu, 14 Jul 2022 13:39:42 GMT</pubDate>
    <dc:creator>Or</dc:creator>
    <dc:date>2022-07-14T13:39:42Z</dc:date>
    <item>
      <title>use if-statement in a count function</title>
      <link>https://community.qlik.com/t5/Reporting-Service-Alerting/use-if-statement-in-a-count-function/m-p/1955646#M292</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I make a If-function to generate a value in a kolom in the table. Now I want to count how many times value a is generated en how many value B is generated. For example I generated the modulo from how many a buyer buy (Sales) and how many of this item are in a box (Packages). When modulo is equal to zero than the value is a otherwise it will be value b.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;item&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; modulo&lt;BR /&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;a&lt;BR /&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;a&lt;BR /&gt;3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;b&lt;/P&gt;
&lt;P&gt;So i thought that I can use the next function: count (if(mod(Sales, Packages)=0, 'a', 'b')='a') or&amp;nbsp;count (if(mod(Sales, Packages)=0, 'a', 'b')='B')&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But it look's like he only count all the items, so he gives me the answer 3. Can you help me?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:07:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Reporting-Service-Alerting/use-if-statement-in-a-count-function/m-p/1955646#M292</guid>
      <dc:creator>GreskeB</dc:creator>
      <dc:date>2024-11-15T22:07:14Z</dc:date>
    </item>
    <item>
      <title>Re: use if-statement in a count function</title>
      <link>https://community.qlik.com/t5/Reporting-Service-Alerting/use-if-statement-in-a-count-function/m-p/1955913#M293</link>
      <description>&lt;P&gt;It looks like you might want to create a table or graph with modulo being the dimension and count(item) being the measure?&lt;/P&gt;
&lt;P&gt;If this needs to be done script-side instead, perhaps:&lt;/P&gt;
&lt;P&gt;Load modulo, count(item) as myCount&lt;/P&gt;
&lt;P&gt;From YourTable&lt;/P&gt;
&lt;P&gt;Group by modulo;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jul 2022 13:39:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Reporting-Service-Alerting/use-if-statement-in-a-count-function/m-p/1955913#M293</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2022-07-14T13:39:42Z</dc:date>
    </item>
  </channel>
</rss>

