<?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 STD Deviation from an AGGR function. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/STD-Deviation-from-an-AGGR-function/m-p/1662072#M448893</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;im trying to create a std deviation calculation to show how far away from the price a certain customer is.&amp;nbsp;&lt;/P&gt;&lt;P&gt;so i have this logic:&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;min&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;total&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;If&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;PricePaid&lt;SPAN class="s1"&gt; = &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;FirstSortedValue&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;TOTAL&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;&amp;gt; &lt;/SPAN&gt;PricePaid&lt;SPAN class="s1"&gt;, -&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Sum&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;&amp;gt;}&lt;/SPAN&gt;[Quantity]&lt;SPAN class="s1"&gt;), &lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;PricePaid&lt;SPAN class="s1"&gt;)), &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;only&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;&amp;gt;}&lt;/SPAN&gt;PricePaid&lt;SPAN class="s1"&gt;)), &lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;PricePaid&lt;SPAN class="s1"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;which finds by each customer the most frequent price each customer has paid for a particular product, as shown below an example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-01-02 at 12.38.28.png" style="width: 208px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/26272i7DB3B2FCF503BC54/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-01-02 at 12.38.28.png" alt="Screenshot 2020-01-02 at 12.38.28.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;what i want to do is then create ST deviation for these results that are created in using the logic above.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;is this something that i can incorporate into a Stdev expression?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jan 2020 12:40:16 GMT</pubDate>
    <dc:creator>LeeSmithBtn</dc:creator>
    <dc:date>2020-01-02T12:40:16Z</dc:date>
    <item>
      <title>STD Deviation from an AGGR function.</title>
      <link>https://community.qlik.com/t5/QlikView/STD-Deviation-from-an-AGGR-function/m-p/1662072#M448893</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;im trying to create a std deviation calculation to show how far away from the price a certain customer is.&amp;nbsp;&lt;/P&gt;&lt;P&gt;so i have this logic:&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;=&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;min&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;total&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;&amp;gt; &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;&amp;gt;}&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;If&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;PricePaid&lt;SPAN class="s1"&gt; = &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;FirstSortedValue&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;&amp;gt;} &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;TOTAL&lt;/SPAN&gt;&lt;SPAN class="s1"&gt; &amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;&amp;gt; &lt;/SPAN&gt;PricePaid&lt;SPAN class="s1"&gt;, -&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Aggr&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;(&lt;/SPAN&gt;&lt;SPAN class="s2"&gt;Sum&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;&amp;gt;}&lt;/SPAN&gt;[Quantity]&lt;SPAN class="s1"&gt;), &lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;PricePaid&lt;SPAN class="s1"&gt;)), &lt;/SPAN&gt;&lt;SPAN class="s2"&gt;only&lt;/SPAN&gt;&lt;SPAN class="s1"&gt;({&amp;lt;&lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;&amp;gt;}&lt;/SPAN&gt;PricePaid&lt;SPAN class="s1"&gt;)), &lt;/SPAN&gt;Customer&lt;SPAN class="s1"&gt;, &lt;/SPAN&gt;PricePaid&lt;SPAN class="s1"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;which finds by each customer the most frequent price each customer has paid for a particular product, as shown below an example:&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2020-01-02 at 12.38.28.png" style="width: 208px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/26272i7DB3B2FCF503BC54/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2020-01-02 at 12.38.28.png" alt="Screenshot 2020-01-02 at 12.38.28.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;what i want to do is then create ST deviation for these results that are created in using the logic above.&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;&lt;SPAN class="s1"&gt;is this something that i can incorporate into a Stdev expression?&lt;/SPAN&gt;&lt;/P&gt;&lt;P class="p1"&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2020 12:40:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/STD-Deviation-from-an-AGGR-function/m-p/1662072#M448893</guid>
      <dc:creator>LeeSmithBtn</dc:creator>
      <dc:date>2020-01-02T12:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: STD Deviation from an AGGR function.</title>
      <link>https://community.qlik.com/t5/QlikView/STD-Deviation-from-an-AGGR-function/m-p/1662175#M448904</link>
      <description>&lt;P&gt;Maybe the following would work:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/New_Statistics_Box.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/New_Statistics_Box.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Statistics_Box.htm" target="_blank"&gt;https://help.qlik.com/en-US/qlikview/April2019/Subsystems/Client/Content/QV_QlikView/Statistics_Box.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Best I have, hopefully that may be of some help, if not, hopefully someone else that is better at development will be able to suggest something.&amp;nbsp; You could try the Design Blog area too, but I did some searching, was not finding much related to stats though...&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2020 16:15:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/STD-Deviation-from-an-AGGR-function/m-p/1662175#M448904</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-01-02T16:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: STD Deviation from an AGGR function.</title>
      <link>https://community.qlik.com/t5/QlikView/STD-Deviation-from-an-AGGR-function/m-p/1662253#M448912</link>
      <description>&lt;P&gt;You just need to wrap your function in another aggregation and then calculate the standard deviation; please note you had some unnecessary set expressions in your formula which I've removed&amp;nbsp;&lt;/P&gt;&lt;P&gt;=Stdev(aggr(min(total &amp;lt;Customer&amp;gt; Aggr(If(PricePaid = FirstSortedValue( TOTAL &amp;lt;Customer&amp;gt; PricePaid, -Aggr(Sum([Quantity]), Customer, PricePaid)), only(PricePaid)), Customer, PricePaid)), Customer))&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2020 20:45:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/STD-Deviation-from-an-AGGR-function/m-p/1662253#M448912</guid>
      <dc:creator>lorenzoconforti</dc:creator>
      <dc:date>2020-01-02T20:45:35Z</dc:date>
    </item>
  </channel>
</rss>

