<?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 Getting the modal average of a column containing strings in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Getting-the-modal-average-of-a-column-containing-strings/m-p/612648#M683226</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's say I have two tables like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Orders:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; 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;Order ID&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;User ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ord1&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;ord2&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;ord3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Users:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; 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;User ID&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;User Name&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Jordan&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Clive&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have somewhat like the tables above being brought into Qlikview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way, in a text object's expression, that I can print the user that has added an order the most amount of times (the Modal Average)? In the example above it would print Jordan, because he has added two orders where Clive has only added 1. This is of course a very simplified example, but it has the basic idea.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 20 Feb 2014 15:00:28 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-02-20T15:00:28Z</dc:date>
    <item>
      <title>Getting the modal average of a column containing strings</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-the-modal-average-of-a-column-containing-strings/m-p/612648#M683226</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Let's say I have two tables like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Orders:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; 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;Order ID&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;User ID&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;ord1&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;ord2&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;ord3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Users:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000; 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;User ID&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;User Name&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Jordan&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Clive&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have somewhat like the tables above being brought into Qlikview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way, in a text object's expression, that I can print the user that has added an order the most amount of times (the Modal Average)? In the example above it would print Jordan, because he has added two orders where Clive has only added 1. This is of course a very simplified example, but it has the basic idea.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 15:00:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-the-modal-average-of-a-column-containing-strings/m-p/612648#M683226</guid>
      <dc:creator />
      <dc:date>2014-02-20T15:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the modal average of a column containing strings</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-the-modal-average-of-a-column-containing-strings/m-p/612649#M683227</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about something like the attached?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression I used in the text box:&lt;/P&gt;&lt;P&gt;=concat({&amp;lt;[User ID]={'=count([Order ID])=$(=max(aggr(count([Order ID]),[User Name])))'}&amp;gt;}distinct [User Name], ', ')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used concat() in case there are two (or more users) who have ordered the most amount of times.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 16:03:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-the-modal-average-of-a-column-containing-strings/m-p/612649#M683227</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-02-20T16:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Getting the modal average of a column containing strings</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-the-modal-average-of-a-column-containing-strings/m-p/612650#M683228</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm struggling to figure out how this works - but it does! Thanks a lot.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 16:10:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-the-modal-average-of-a-column-containing-strings/m-p/612650#M683228</guid>
      <dc:creator />
      <dc:date>2014-02-20T16:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Getting the modal average of a column containing strings</title>
      <link>https://community.qlik.com/t5/QlikView/Getting-the-modal-average-of-a-column-containing-strings/m-p/612651#M683229</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, I can explain a bit:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;=concat({&amp;lt;[User ID]={'=&lt;SPAN style="text-decoration: underline;"&gt;count([Order ID])&lt;/SPAN&gt;=&lt;STRONG&gt;$(=max(aggr(count([Order ID]),[User Name])))&lt;/STRONG&gt;'}&amp;gt;}distinct [User Name], ', ')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;SPAN style="text-decoration: underline;"&gt;underlined&lt;/SPAN&gt; part counts the number of [Order ID] for each user.&lt;/P&gt;&lt;P&gt;The &lt;STRONG&gt;bold&lt;/STRONG&gt; part finds the max number of [Order ID] across all users.&lt;/P&gt;&lt;P&gt;So if &lt;SPAN style="text-decoration: underline;"&gt;the number of [Order ID] for a user&lt;/SPAN&gt; is equal to the &lt;STRONG&gt;max number of [Order ID] across all users&lt;/STRONG&gt;, we include that [User ID] and use that [User Name] in the concat().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also, please mark helpful and correct answers so others can find solutions to their problems too &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 20 Feb 2014 16:14:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Getting-the-modal-average-of-a-column-containing-strings/m-p/612651#M683229</guid>
      <dc:creator>Nicole-Smith</dc:creator>
      <dc:date>2014-02-20T16:14:52Z</dc:date>
    </item>
  </channel>
</rss>

