<?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 Count # employees earning less/more than the average (per month, quarter, year) in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Count-employees-earning-less-more-than-the-average-per-month/m-p/1728502#M64018</link>
    <description>&lt;P&gt;Dear Qlik Community,&lt;/P&gt;&lt;P&gt;I am currently looking to count the number of employees earning less/more than the average in a given time-period (in a bar graph).&amp;nbsp;&lt;/P&gt;&lt;P&gt;For average salary per month I have the following equation:&lt;/P&gt;&lt;P&gt;avg(aggr(sum({&amp;lt;Amount={'=sum(Amount) &amp;gt;1'}&amp;gt;}Amount), key, &lt;STRONG&gt;MonthYear&lt;/STRONG&gt;))&lt;/P&gt;&lt;P&gt;To obtain the average per quarter or year I just replace 'MonthYear' with quarter or year.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried counting the # of employees earning less/ more with if statements and set analysis:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Attempt 1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;count ( {&amp;lt; key = {" avg(aggr(sum({&amp;lt;Amount={'=sum(Amount) &amp;gt;1'}&amp;gt;}Amount), key, MonthYear)) &amp;gt; avg(aggr(sum({&amp;lt;Amount={'=sum(Amount) &amp;gt;1'}&amp;gt;}Amount), key, MonthYear))"} &amp;gt;} distinct key)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Attempt 2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if(avg(aggr(sum({&amp;lt;Amount={'=sum(Amount) &amp;gt;1'}&amp;gt;}Amount), key, MonthYear)) &amp;lt; avg(aggr(sum({&amp;lt;Amount={'=sum(Amount) &amp;gt;1'}&amp;gt;}Amount), key, MonthYear)), count (distinct key))&lt;/P&gt;&lt;P&gt;I realise I am doing something very wrong (beyond the syntax I can't figure out how to differentiate the average salary per month to the average salary of the specific person so that teh &amp;lt;&amp;nbsp; or &amp;gt;&amp;nbsp; exclusions works)&amp;nbsp; ! I can't seem to figure this out. Any advice would be very much appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Mohammed&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 18:21:12 GMT</pubDate>
    <dc:creator>malradi88</dc:creator>
    <dc:date>2024-11-16T18:21:12Z</dc:date>
    <item>
      <title>Count # employees earning less/more than the average (per month, quarter, year)</title>
      <link>https://community.qlik.com/t5/App-Development/Count-employees-earning-less-more-than-the-average-per-month/m-p/1728502#M64018</link>
      <description>&lt;P&gt;Dear Qlik Community,&lt;/P&gt;&lt;P&gt;I am currently looking to count the number of employees earning less/more than the average in a given time-period (in a bar graph).&amp;nbsp;&lt;/P&gt;&lt;P&gt;For average salary per month I have the following equation:&lt;/P&gt;&lt;P&gt;avg(aggr(sum({&amp;lt;Amount={'=sum(Amount) &amp;gt;1'}&amp;gt;}Amount), key, &lt;STRONG&gt;MonthYear&lt;/STRONG&gt;))&lt;/P&gt;&lt;P&gt;To obtain the average per quarter or year I just replace 'MonthYear' with quarter or year.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried counting the # of employees earning less/ more with if statements and set analysis:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Attempt 1:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;count ( {&amp;lt; key = {" avg(aggr(sum({&amp;lt;Amount={'=sum(Amount) &amp;gt;1'}&amp;gt;}Amount), key, MonthYear)) &amp;gt; avg(aggr(sum({&amp;lt;Amount={'=sum(Amount) &amp;gt;1'}&amp;gt;}Amount), key, MonthYear))"} &amp;gt;} distinct key)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Attempt 2:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if(avg(aggr(sum({&amp;lt;Amount={'=sum(Amount) &amp;gt;1'}&amp;gt;}Amount), key, MonthYear)) &amp;lt; avg(aggr(sum({&amp;lt;Amount={'=sum(Amount) &amp;gt;1'}&amp;gt;}Amount), key, MonthYear)), count (distinct key))&lt;/P&gt;&lt;P&gt;I realise I am doing something very wrong (beyond the syntax I can't figure out how to differentiate the average salary per month to the average salary of the specific person so that teh &amp;lt;&amp;nbsp; or &amp;gt;&amp;nbsp; exclusions works)&amp;nbsp; ! I can't seem to figure this out. Any advice would be very much appreciated &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Mohammed&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:21:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-employees-earning-less-more-than-the-average-per-month/m-p/1728502#M64018</guid>
      <dc:creator>malradi88</dc:creator>
      <dc:date>2024-11-16T18:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Count # employees earning less/more than the average (per month, quarter, year)</title>
      <link>https://community.qlik.com/t5/App-Development/Count-employees-earning-less-more-than-the-average-per-month/m-p/1729289#M64019</link>
      <description>&lt;P&gt;Are you trying this may be?&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Count(DISTINCT Aggr(

If(Sum({&amp;lt;Amount = {"&amp;gt;1"}&amp;gt;} Amount) &amp;gt; Avg(TOTAL &amp;lt;MonthYear&amp;gt; Aggr(Sum({&amp;lt;Amount = {"&amp;gt;1"}&amp;gt;} Amount), key, MonthYear)), key)

, key, MonthYear))&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 20 Jul 2020 16:33:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-employees-earning-less-more-than-the-average-per-month/m-p/1729289#M64019</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-07-20T16:33:18Z</dc:date>
    </item>
    <item>
      <title>Re: Count # employees earning less/more than the average (per month, quarter, year)</title>
      <link>https://community.qlik.com/t5/App-Development/Count-employees-earning-less-more-than-the-average-per-month/m-p/1731320#M64020</link>
      <description>&lt;P&gt;Thank you very much Sunny! Works perfectly.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jul 2020 10:33:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-employees-earning-less-more-than-the-average-per-month/m-p/1731320#M64020</guid>
      <dc:creator>malradi88</dc:creator>
      <dc:date>2020-07-28T10:33:25Z</dc:date>
    </item>
  </channel>
</rss>

