<?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: count and stdev using aggr function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/count-and-stdev-using-aggr-function/m-p/1248388#M867976</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Almost getting what you need&lt;/P&gt;&lt;P&gt;In this case, mean an how many purchases are the same indicator?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capturar.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/146408_Capturar.PNG" style="height: 149px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Dec 2016 17:39:15 GMT</pubDate>
    <dc:creator>Clever_Anjos</dc:creator>
    <dc:date>2016-12-12T17:39:15Z</dc:date>
    <item>
      <title>count and stdev using aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/count-and-stdev-using-aggr-function/m-p/1248381#M867969</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;Hello! I hope your holidays have started well! &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;I have attached a document to this with a small portion of my data where I am trying to count the number of pieces of furniture sold, and then perform some statistical analysis on it (currently, find the standard deviation).&amp;nbsp; The overall goal is to derive an understanding of which product is more successful and which items do not sell like the norm of the other tables.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;Overall, I want to count the number of pieces sold, however, I do not load in an install count.&amp;nbsp; What I have been doing so far is a count(1), simply counting the number of times that a type of instance occurs (ie, counting the number of times a piece is sold that is made of willow or oak).&amp;nbsp; However, for more statistical analysis, I have started using the aggr function.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = sum(aggr(count(sale_value), _dimension_)))&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;However, in order to take the standard deviation to see if a certain combination, such as if a certain color of furniture that has a presence online and is bought by a return visitor, falls into normal purchasing behaviour for our customers, I would do &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =stdev(aggr(count(sale_value), date))) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;However, when I use this, it does not return values in the cells (only the actual standard deviation in the total line).&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;I would like to, in the end, also be able to see how far off the mean is/how far from normal purchasing behaviour certain instances are.&amp;nbsp; So if furniture that are willow have an uncommonly low purchase value, I would like to know that. The formula I have been using is the following, but that doesn't work either &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt; any help would be most appreciated!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;=if((count(sale_value)&amp;gt;(Stdev(aggr(count(sale_value), date)) + avg(aggr(count(sale_value), date)))), 'yes', ' no')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;If you have any ideas on how I could make this work, I would greatly appreciate it! &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Times New Roman; font-size: 12pt;"&gt;Thanks so much!&lt;BR /&gt;&lt;/SPAN&gt;&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/count-and-stdev-using-aggr-function/m-p/1248381#M867969</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: count and stdev using aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/count-and-stdev-using-aggr-function/m-p/1248382#M867970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;STD is defined to a list with more than one value &lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Times New Roman'; font-size: 16px;"&gt;=(aggr(count(sale_value), date))) would return only one value, that basically would return "0" as SD.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Times New Roman'; font-size: 16px;"&gt;That´s because your totalization value has a defined value, because you have 3 distinct values&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 17:09:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-and-stdev-using-aggr-function/m-p/1248382#M867970</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-12-12T17:09:10Z</dc:date>
    </item>
    <item>
      <title>Re: count and stdev using aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/count-and-stdev-using-aggr-function/m-p/1248383#M867971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want the standard deviation from the sum values of each day please use &lt;/P&gt;&lt;P&gt;1) Create an ID for each dayxproduct combination&lt;/P&gt;&lt;P&gt;Load product, color, country, sale_value, date, delivered_to, return_customer, item_online,RowNo() as ID inline [&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Use this:&lt;/P&gt;&lt;P&gt;=stdev(aggr(sum(sale_value), ID))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 17:11:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-and-stdev-using-aggr-function/m-p/1248383#M867971</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-12-12T17:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: count and stdev using aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/count-and-stdev-using-aggr-function/m-p/1248384#M867972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you! I just edited my post as well to include a secondary part, being that I am trying to see if the instance's value is between one standard deviation and the mean (primarily interested in the upper value).&amp;nbsp; Do you have any thoughts on this? Thank yoU!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 17:12:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-and-stdev-using-aggr-function/m-p/1248384#M867972</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-12T17:12:02Z</dc:date>
    </item>
    <item>
      <title>Re: count and stdev using aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/count-and-stdev-using-aggr-function/m-p/1248385#M867973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another thought&lt;/P&gt;&lt;P&gt;As you have "date" as dimension, Qlik will aggregate by date, you don´t need to specify this&lt;/P&gt;&lt;P&gt;=sum(aggr(count(sale_value), date))&lt;/P&gt;&lt;P&gt;becomes&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;count(sale_value)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;And check "Sum of Rows" as Total Mode&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 17:21:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-and-stdev-using-aggr-function/m-p/1248385#M867973</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-12-12T17:21:04Z</dc:date>
    </item>
    <item>
      <title>Re: count and stdev using aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/count-and-stdev-using-aggr-function/m-p/1248386#M867974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You say "&lt;SPAN style="color: #000000; font-family: 'Times New Roman'; font-size: 16px;"&gt;uncommonly low purchase value" but you are counting &lt;SPAN style="color: #000000; font-family: 'Times New Roman'; font-size: 16px;"&gt;sale_value, wouldn´t you sum them?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you mean by "&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;instance's " ? It´s a date? It´s a Date x color x product combination?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 17:27:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-and-stdev-using-aggr-function/m-p/1248386#M867974</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-12-12T17:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: count and stdev using aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/count-and-stdev-using-aggr-function/m-p/1248387#M867975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well by counting sale value, my purpose was simply to count the number of times there was a purchase.&amp;nbsp; it could have counting the product itself.&amp;nbsp; (basically, it is a work around for not including in the load script a line counting the number of purchases, such as '1' as purchase_count)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I say instances, I mean that a combination of willow, nov 30th, chair is one instance while willow, dec 1st, and chair is another instance. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 17:31:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-and-stdev-using-aggr-function/m-p/1248387#M867975</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-12-12T17:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: count and stdev using aggr function</title>
      <link>https://community.qlik.com/t5/QlikView/count-and-stdev-using-aggr-function/m-p/1248388#M867976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Almost getting what you need&lt;/P&gt;&lt;P&gt;In this case, mean an how many purchases are the same indicator?&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capturar.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/146408_Capturar.PNG" style="height: 149px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2016 17:39:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/count-and-stdev-using-aggr-function/m-p/1248388#M867976</guid>
      <dc:creator>Clever_Anjos</dc:creator>
      <dc:date>2016-12-12T17:39:15Z</dc:date>
    </item>
  </channel>
</rss>

