<?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 Tricky problem about std deviation calculation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Tricky-problem-about-std-deviation-calculation/m-p/456638#M170490</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose I have one file with &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;City&lt;/P&gt;&lt;P&gt;Region&lt;/P&gt;&lt;P&gt;A&amp;nbsp; (my first indicator) &lt;/P&gt;&lt;P&gt;B&amp;nbsp; (my second indicator)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A city belongs in only one Region. So a Region is a set of cities.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have build an application where an user select&amp;nbsp; a city (just one), then we want to display : &lt;/P&gt;&lt;P&gt;(1)&amp;nbsp;&amp;nbsp; the value&amp;nbsp; of&amp;nbsp; A/B&amp;nbsp;&amp;nbsp; for the selected city&lt;/P&gt;&lt;P&gt;(2)&amp;nbsp;&amp;nbsp; the value&amp;nbsp; of A/B&amp;nbsp;&amp;nbsp;&amp;nbsp; for&amp;nbsp; the region where the city belongs&lt;/P&gt;&lt;P&gt;(3)&amp;nbsp;&amp;nbsp;&amp;nbsp; the value of the standard deviation (stdev)&amp;nbsp;&amp;nbsp; of A/B&amp;nbsp;&amp;nbsp;&amp;nbsp; for&amp;nbsp; the region where the city belongs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This calculation of standard deviation is needed to get a color coding of the 1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&amp;nbsp; (1)&amp;nbsp;&amp;nbsp; &amp;lt;&amp;nbsp;&amp;nbsp; (2)&amp;nbsp;&amp;nbsp;&amp;nbsp; - (3)&amp;nbsp;&amp;nbsp; =&amp;gt;&amp;nbsp; color in RED&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&amp;nbsp;&amp;nbsp;&amp;nbsp; (2) - (3)&amp;nbsp; &amp;lt;&amp;nbsp; (1) &amp;lt;&amp;nbsp;&amp;nbsp; (2) + (3)&amp;nbsp;&amp;nbsp; =&amp;gt; color&amp;nbsp; in YELLOW&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&amp;nbsp; (2)&amp;nbsp; +&amp;nbsp; (3)&amp;nbsp;&amp;nbsp; &amp;lt;&amp;nbsp; (1)&amp;nbsp;&amp;nbsp; =&amp;gt;&amp;nbsp; color in&amp;nbsp; GREEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For (1)&amp;nbsp;&amp;nbsp; no problem&lt;/P&gt;&lt;P&gt;For (2)&amp;nbsp;&amp;nbsp; no problem&amp;nbsp;&amp;nbsp; using&amp;nbsp; the P() function&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(&amp;nbsp; {&amp;lt; Region=P(Region)&amp;nbsp; &amp;gt;}&amp;nbsp;&amp;nbsp; A ) /&amp;nbsp;&amp;nbsp; Sum(&amp;nbsp; {&amp;lt; Region=P(Region)&amp;nbsp; &amp;gt;}&amp;nbsp;&amp;nbsp; B )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For (3)&amp;nbsp; I can't use&amp;nbsp;&amp;nbsp; of course&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Stdev &amp;amp;&amp;nbsp; sum together, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Indeed&amp;nbsp;&amp;nbsp; we try with AGGR, but it seems AGGR&amp;nbsp; doen't works with P()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry to be long, maybe someone has the solution&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;JJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 21 Nov 2012 18:06:15 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-11-21T18:06:15Z</dc:date>
    <item>
      <title>Tricky problem about std deviation calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-problem-about-std-deviation-calculation/m-p/456638#M170490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose I have one file with &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;City&lt;/P&gt;&lt;P&gt;Region&lt;/P&gt;&lt;P&gt;A&amp;nbsp; (my first indicator) &lt;/P&gt;&lt;P&gt;B&amp;nbsp; (my second indicator)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A city belongs in only one Region. So a Region is a set of cities.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;We have build an application where an user select&amp;nbsp; a city (just one), then we want to display : &lt;/P&gt;&lt;P&gt;(1)&amp;nbsp;&amp;nbsp; the value&amp;nbsp; of&amp;nbsp; A/B&amp;nbsp;&amp;nbsp; for the selected city&lt;/P&gt;&lt;P&gt;(2)&amp;nbsp;&amp;nbsp; the value&amp;nbsp; of A/B&amp;nbsp;&amp;nbsp;&amp;nbsp; for&amp;nbsp; the region where the city belongs&lt;/P&gt;&lt;P&gt;(3)&amp;nbsp;&amp;nbsp;&amp;nbsp; the value of the standard deviation (stdev)&amp;nbsp;&amp;nbsp; of A/B&amp;nbsp;&amp;nbsp;&amp;nbsp; for&amp;nbsp; the region where the city belongs&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This calculation of standard deviation is needed to get a color coding of the 1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&amp;nbsp; (1)&amp;nbsp;&amp;nbsp; &amp;lt;&amp;nbsp;&amp;nbsp; (2)&amp;nbsp;&amp;nbsp;&amp;nbsp; - (3)&amp;nbsp;&amp;nbsp; =&amp;gt;&amp;nbsp; color in RED&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&amp;nbsp;&amp;nbsp;&amp;nbsp; (2) - (3)&amp;nbsp; &amp;lt;&amp;nbsp; (1) &amp;lt;&amp;nbsp;&amp;nbsp; (2) + (3)&amp;nbsp;&amp;nbsp; =&amp;gt; color&amp;nbsp; in YELLOW&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if&amp;nbsp; (2)&amp;nbsp; +&amp;nbsp; (3)&amp;nbsp;&amp;nbsp; &amp;lt;&amp;nbsp; (1)&amp;nbsp;&amp;nbsp; =&amp;gt;&amp;nbsp; color in&amp;nbsp; GREEN&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For (1)&amp;nbsp;&amp;nbsp; no problem&lt;/P&gt;&lt;P&gt;For (2)&amp;nbsp;&amp;nbsp; no problem&amp;nbsp;&amp;nbsp; using&amp;nbsp; the P() function&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sum(&amp;nbsp; {&amp;lt; Region=P(Region)&amp;nbsp; &amp;gt;}&amp;nbsp;&amp;nbsp; A ) /&amp;nbsp;&amp;nbsp; Sum(&amp;nbsp; {&amp;lt; Region=P(Region)&amp;nbsp; &amp;gt;}&amp;nbsp;&amp;nbsp; B )&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For (3)&amp;nbsp; I can't use&amp;nbsp;&amp;nbsp; of course&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Stdev &amp;amp;&amp;nbsp; sum together, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Indeed&amp;nbsp;&amp;nbsp; we try with AGGR, but it seems AGGR&amp;nbsp; doen't works with P()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sorry to be long, maybe someone has the solution&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;JJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 18:06:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-problem-about-std-deviation-calculation/m-p/456638#M170490</guid>
      <dc:creator />
      <dc:date>2012-11-21T18:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky problem about std deviation calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-problem-about-std-deviation-calculation/m-p/456639#M170491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;May be you can use this concept&lt;/P&gt;&lt;P&gt;SD = Squareroot(Avg)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you tell me standard deviation should be computed on what basis?&lt;/P&gt;&lt;P&gt;Can you attach a sample.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 18:18:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-problem-about-std-deviation-calculation/m-p/456639#M170491</guid>
      <dc:creator>CELAMBARASAN</dc:creator>
      <dc:date>2012-11-21T18:18:31Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky problem about std deviation calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-problem-about-std-deviation-calculation/m-p/456640#M170492</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;standard deviation should be calculated like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=&amp;nbsp; sqr(&amp;nbsp; [&amp;nbsp; (sum(&amp;nbsp; a^2/b^2)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;nbsp;&amp;nbsp; (sum(a)/sum(b))^2 ) ] /&amp;nbsp; N&amp;nbsp; )&amp;nbsp;&amp;nbsp;&amp;nbsp; huygens formula&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where N is my number of cities in the region&amp;nbsp;&amp;nbsp; and&amp;nbsp; ^2&amp;nbsp; is the power 2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course I prefer to use&amp;nbsp; STDEV function instead&amp;nbsp; of the previous formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;JJ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 18:39:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-problem-about-std-deviation-calculation/m-p/456640#M170492</guid>
      <dc:creator />
      <dc:date>2012-11-21T18:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Tricky problem about std deviation calculation</title>
      <link>https://community.qlik.com/t5/QlikView/Tricky-problem-about-std-deviation-calculation/m-p/456641#M170493</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This a sample&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems to work with huyghens formula&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 21 Nov 2012 19:49:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Tricky-problem-about-std-deviation-calculation/m-p/456641#M170493</guid>
      <dc:creator />
      <dc:date>2012-11-21T19:49:36Z</dc:date>
    </item>
  </channel>
</rss>

