<?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 Sense - Histogram - using class() and aggr() in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138791#M20135</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hahahahaha, if you insist &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Dimension:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Aggr(Class(Count([Incident number]), Round(Count(TOTAL [Incident number])/&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;5&lt;/SPAN&gt;)), [Opened by])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Expression:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Count(DISTINCT [Incident number])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Aug 2016 15:28:56 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-08-05T15:28:56Z</dc:date>
    <item>
      <title>Qlik Sense - Histogram - using class() and aggr()</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138784#M20128</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 would like to create a histogram. I have seen some examples on discussion forums using the class() and aggr() functions by they were not very clear and I am struggling to get it right.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data (of relevance) is as in the following format:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" 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;Incident number&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Opened by&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;AB001&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Jane&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;AB002&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;John&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;AB003&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Mike&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;AB004&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;John&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;AB005&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Jane&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Incident number] is an ID field and I perform Count([Incident number]) to tally the number of incidents opened by each person.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to get a histogram that will have bins for Count([Incident number]) of the X-axis and the number of people (from the [Opened by] field) that fall in each bin on the y-axis.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If possible, I would also like the bin widths to be generated dynamically ans other field options may be selected that would filter the data used in aggregation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know if this can be obtained using the class and aggr functions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Conor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 09:36:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138784#M20128</guid>
      <dc:creator />
      <dc:date>2016-08-05T09:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Histogram - using class() and aggr()</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138785#M20129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Bin width can be dynamic, but you would atleast need to know how many bins you want, right? May be try along these lines:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dimension:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Aggr(Class(Count([Incident number]), Round(Count([Incident number])/&lt;SPAN style="color: #ff0000;"&gt;5&lt;/SPAN&gt;)), [Opened by])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13.3333px;"&gt;Count([Incident number])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here I assumed that you need &lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;5 &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;bins, but you can change that number dynamically using a user input into a variable I guess.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 09:57:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138785#M20129</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-05T09:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Histogram - using class() and aggr()</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138786#M20130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for this. It's a lot closer to what I want.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have changed the measure to Count(distinct [opened by]) as I'm looking to count the number of people for whom their total is in that bin.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only problem is with the bin size. Using the method you have provided the bin widths are not of equal width in terms of the Count([Incident number]) range.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I would like bins like: 1-20, 21-40, 41-60 etc. with these numbers based on &lt;SPAN style="font-size: 13.3333px;"&gt;Count([Incident number]).&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 10:06:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138786#M20130</guid>
      <dc:creator />
      <dc:date>2016-08-05T10:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Histogram - using class() and aggr()</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138787#M20131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Really the bins are not equal? Would you be able to share a screenshot of how the bins look?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 11:08:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138787#M20131</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-05T11:08:16Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Histogram - using class() and aggr()</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138788#M20132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="qlikexample3.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/133753_qlikexample3.png" style="height: 255px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 12:38:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138788#M20132</guid>
      <dc:creator />
      <dc:date>2016-08-05T12:38:08Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Histogram - using class() and aggr()</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138789#M20133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;My bad, try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Aggr(Class(Count([Incident number]), Round(Count(&lt;SPAN style="color: #ff0000;"&gt;TOTAL&lt;/SPAN&gt; [Incident &lt;SPAN style="color: #3d3d3d;"&gt;number])/&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;5&lt;/SPAN&gt;))&lt;/SPAN&gt;, [Opened by])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 13:20:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138789#M20133</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-05T13:20:41Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Histogram - using class() and aggr()</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138790#M20134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much. This is working now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;From what I understand the number (5 in this case) that you are dividing by seems to set the bin width in the follow way: bin width = total count of all / 5&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I made my bin widths smaller by making this a larger number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you want to post one more reply with the dimension as you last listed it and the measure as &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Count(distinct [opened by])&amp;nbsp; and I will mark it as the correct answer?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you again! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:13:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138790#M20134</guid>
      <dc:creator />
      <dc:date>2016-08-05T15:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Histogram - using class() and aggr()</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138791#M20135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hahahahaha, if you insist &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Dimension:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Aggr(Class(Count([Incident number]), Round(Count(TOTAL [Incident number])/&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;5&lt;/SPAN&gt;)), [Opened by])&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Expression:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Count(DISTINCT [Incident number])&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:28:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138791#M20135</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-05T15:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Histogram - using class() and aggr()</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138792#M20136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That should be:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Dimension:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Aggr(Class(Count([Incident number]), Round(Count(TOTAL [Incident number])/&lt;SPAN style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #ff0000;"&gt;5&lt;/SPAN&gt;)), )&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Expression:&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Count(DISTINCT &lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;[Opened by]&lt;/STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 15:59:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138792#M20136</guid>
      <dc:creator />
      <dc:date>2016-08-05T15:59:07Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Sense - Histogram - using class() and aggr()</title>
      <link>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138793#M20137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oops, my bad &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Aug 2016 16:34:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Qlik-Sense-Histogram-using-class-and-aggr/m-p/1138793#M20137</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-08-05T16:34:54Z</dc:date>
    </item>
  </channel>
</rss>

