<?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: Aggregating 2 columns in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggregating-2-columns/m-p/1443656#M808575</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(Count({&amp;lt;&lt;SPAN style="font-size: 13.3333px;"&gt;[Count of Terminals logged on to] = {'&amp;gt;1'} &lt;/SPAN&gt;&amp;gt;} [Count of Terminals logged on to]), Date, User))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;OR If it is expression&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Count({&amp;lt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;[Count of Terminals logged on to] = {"=Expression &amp;gt; 1"} &lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;gt;} [Count of Terminals logged on to])&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 13 Oct 2017 07:40:08 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2017-10-13T07:40:08Z</dc:date>
    <item>
      <title>Aggregating 2 columns</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregating-2-columns/m-p/1443655#M808574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was wondering if anyone could help me out. I would like to create a count of values based on aggregating 2 columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The 3 fields i have are &lt;STRONG&gt;date, user and (Number of terminals logged on to)&lt;/STRONG&gt;. Using a straight table, if i place date and user as dimensions and in the expression create a count of the distinct (Number of terminals logged on to) I get my desired result which looks like the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#000000&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;,&amp;quot;verticalAlign&amp;quot;:&amp;quot;baseline&amp;quot;}" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Date &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;User &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Count of&amp;nbsp; Terminals logged on to&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;01/10/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;02/10/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;03/10/2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My query is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a text box which displays a count if the number of terminals is greater than 1. However to do so I'm assuming i need to aggregate field Date and User and count the number terminals. I don't know how to do this, can anyone help please?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Than you very much,&lt;/P&gt;&lt;P&gt;Isaac&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/Aggregating-2-columns/m-p/1443655#M808574</guid>
      <dc:creator>isciberras</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating 2 columns</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregating-2-columns/m-p/1443656#M808575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(Count({&amp;lt;&lt;SPAN style="font-size: 13.3333px;"&gt;[Count of Terminals logged on to] = {'&amp;gt;1'} &lt;/SPAN&gt;&amp;gt;} [Count of Terminals logged on to]), Date, User))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;OR If it is expression&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;Count({&amp;lt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;[Count of Terminals logged on to] = {"=Expression &amp;gt; 1"} &lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&amp;gt;} [Count of Terminals logged on to])&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Oct 2017 07:40:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregating-2-columns/m-p/1443656#M808575</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-10-13T07:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating 2 columns</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregating-2-columns/m-p/1443657#M808576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Anil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried your suggestions however unfortunately the first expression returned 0 and the second one doesn't seem to want to work. Just to confirm, in the second expression, where you wrote &lt;STRONG&gt;{"=Expression &amp;gt; 1"} &lt;/STRONG&gt;am I meant to be writing: &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&lt;STRONG&gt;({&amp;lt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;[Count of Terminals logged on to] = {'&amp;gt;1'} &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt;&amp;gt;}&amp;nbsp; ?&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Isaac&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Oct 2017 09:40:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregating-2-columns/m-p/1443657#M808576</guid>
      <dc:creator>isciberras</dc:creator>
      <dc:date>2017-10-13T09:40:26Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating 2 columns</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregating-2-columns/m-p/1443658#M808577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If it is direct field then don't required {"=Exp...."} use simple {'&amp;gt;1'} then try&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Oct 2017 10:58:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregating-2-columns/m-p/1443658#M808577</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-10-13T10:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating 2 columns</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregating-2-columns/m-p/1443659#M808578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;sum({&amp;lt;[Count of&amp;nbsp; Terminals logged on to]= {"&amp;gt; 1"} &amp;gt;}[Count of&amp;nbsp; Terminals logged on to])&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Oct 2017 11:24:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregating-2-columns/m-p/1443659#M808578</guid>
      <dc:creator />
      <dc:date>2017-10-13T11:24:36Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating 2 columns</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregating-2-columns/m-p/1443660#M808579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(Aggr(If(CountExpressionHere &amp;gt; 1, 1, 0), Date, User))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Oct 2017 11:52:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregating-2-columns/m-p/1443660#M808579</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-10-13T11:52:52Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating 2 columns</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregating-2-columns/m-p/1443661#M808580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is working for me: =Count( DISTINCT{&amp;lt;[Count of&amp;nbsp; Terminals logged on to] = {"&amp;gt;1"} &amp;gt;} [Count of&amp;nbsp; Terminals logged on to])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andrei&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Oct 2017 14:37:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregating-2-columns/m-p/1443661#M808580</guid>
      <dc:creator>andrei_delta</dc:creator>
      <dc:date>2017-10-13T14:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Aggregating 2 columns</title>
      <link>https://community.qlik.com/t5/QlikView/Aggregating-2-columns/m-p/1674224#M808581</link>
      <description>&lt;P&gt;Dear,&lt;/P&gt;&lt;P&gt;I am blocked in an aggregation formula.&lt;/P&gt;&lt;P&gt;example:&lt;/P&gt;&lt;P&gt;invoice_id, customer_id, date, amount&lt;/P&gt;&lt;P&gt;123, abc, 01/01/2020, 500eur&lt;/P&gt;&lt;P&gt;525, def, 02/07/2020, 300eur&lt;/P&gt;&lt;P&gt;845, def, 15/02/2020, 100eur&lt;/P&gt;&lt;P&gt;874, abc, 01/02/2020, 300eur&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to see for each row the avg per customer even if the result will be repeated in our case:&amp;nbsp;&lt;/P&gt;&lt;P&gt;it should look like :&lt;/P&gt;&lt;P&gt;123, abc, 400eur&lt;/P&gt;&lt;P&gt;525, def, 200eur&lt;/P&gt;&lt;P&gt;845, def, 200eur&lt;/P&gt;&lt;P&gt;874, abc, 400eur&lt;/P&gt;&lt;P&gt;I do =&amp;gt;&amp;nbsp; aggr(avg(amount),customer_id) but then it shows the result once for a customer and other rows of the same customer nothing is shown. I tried agg(avg(amount),customer_id,invoice_id) to have the result repeated but then no result at all is shown...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I miss something in the understanding of "aggr".&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Mohamed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Feb 2020 07:01:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggregating-2-columns/m-p/1674224#M808581</guid>
      <dc:creator>MohamedELH</dc:creator>
      <dc:date>2020-02-11T07:01:37Z</dc:date>
    </item>
  </channel>
</rss>

