<?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: problem with stddev and median in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/problem-with-stddev-and-median/m-p/858401#M300673</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am getting a different number for st dev in the chart object (equal to what you have for the text box object). Have a look:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Stdev.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/83981_Stdev.PNG" style="height: 123px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also attaching the application (PFA)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Apr 2015 15:41:40 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2015-04-17T15:41:40Z</dc:date>
    <item>
      <title>problem with stddev and median</title>
      <link>https://community.qlik.com/t5/QlikView/problem-with-stddev-and-median/m-p/858400#M300672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is the problem:&lt;/P&gt;&lt;P&gt;I need to use both the standard deviation and the median function.&lt;/P&gt;&lt;P&gt;My data has Numerators and Denominators. Below is what an example table might look like.&lt;/P&gt;&lt;P&gt;The problem is that all the numerators for a single name (Myname) need to be summed.&lt;/P&gt;&lt;P&gt;Then&lt;/P&gt;&lt;P&gt;All the Denominators for a single name (MyName) need to be summed. This sum must be performed before I can do the division i.e. Numerator Over Denominator. I can get the standard deviation by creating a chart and using the StdDev total as the column summary, but I need to do this in a text box. Additionally the Median function is not available in the Chart column total.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought I could do this as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Stdev&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MyNumer&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Myname&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) / &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MyDenom&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;),&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Myname&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;But the answer I get is not correct. How do I know? because I compare it to the stddev function in the chart as described above.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Here is an screen shot of the data in the table I enclosed. Notice the chart gives a standard deviation of .3148 While my text box with the above formula gives 0.17&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Is there a way to do this ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;TY in advance&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Terence&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;IMG class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/83979_pastedImage_0.png" style="max-height: 900px; max-width: 1200px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Table:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;Load&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; * &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;inline&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt; MyMonth, Myname, MyNumer, MyDenom&lt;BR /&gt; 1, Apple, 1, 10&lt;BR /&gt; 2, Apple, 1, 2&lt;BR /&gt; 3, Apple, 3, 4&lt;BR /&gt; 4, Baker, 1, 5&lt;BR /&gt; 5, Baker, 2, 5&lt;BR /&gt; 6, Baker, 1, 7&lt;BR /&gt; 7, Apple, 4, 5&lt;BR /&gt; 8, Cat, 0, 1&lt;BR /&gt; 9, Cat, 1, 10&lt;BR /&gt; 10, Baker, 1, 1&lt;BR /&gt; 11, Baker, 0, 0&lt;BR /&gt; 12 ,Apple, 2, 4&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;;&lt;BR /&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 15:23:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-with-stddev-and-median/m-p/858400#M300672</guid>
      <dc:creator>buffalome90210</dc:creator>
      <dc:date>2015-04-17T15:23:55Z</dc:date>
    </item>
    <item>
      <title>Re: problem with stddev and median</title>
      <link>https://community.qlik.com/t5/QlikView/problem-with-stddev-and-median/m-p/858401#M300673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am getting a different number for st dev in the chart object (equal to what you have for the text box object). Have a look:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Stdev.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/83981_Stdev.PNG" style="height: 123px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also attaching the application (PFA)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 15:41:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-with-stddev-and-median/m-p/858401#M300673</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-17T15:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: problem with stddev and median</title>
      <link>https://community.qlik.com/t5/QlikView/problem-with-stddev-and-median/m-p/858402#M300674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For median you can do something like this as your chart expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Median(Aggr(Sum(MyNumer)/Sum(MyDenom), Myname))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 15:51:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-with-stddev-and-median/m-p/858402#M300674</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-17T15:51:31Z</dc:date>
    </item>
    <item>
      <title>Re: problem with stddev and median</title>
      <link>https://community.qlik.com/t5/QlikView/problem-with-stddev-and-median/m-p/858403#M300675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wait one second.&lt;/P&gt;&lt;P&gt;Let's forget the median issue and just focus on Standard deviation.&lt;/P&gt;&lt;P&gt;If you look at my example, you will see that the stddev which is generated via Qlik in the chart, is the correct standard deviation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The point is, I need this number in a text box. I could pull the number off the Chars via a Macro, but I don't want to use a Macro because they don't work in a webb base. Therefore I want to use a calculation in a text box. I thought the formula/calculation I stated in the original post would work, but it yields a different number than that of the the Qlik Chart generated StdDev.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Additionally, If you attempt the same formula as I am using in the text box with Median instead of StdDev, you will also find that the numbers do not match.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially, the text box formula does not work, and I don't know why.&lt;/P&gt;&lt;P&gt;Does any one have a different formula I can use which would yield the correct number ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;terence&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 16:46:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-with-stddev-and-median/m-p/858403#M300675</guid>
      <dc:creator>buffalome90210</dc:creator>
      <dc:date>2015-04-17T16:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: problem with stddev and median</title>
      <link>https://community.qlik.com/t5/QlikView/problem-with-stddev-and-median/m-p/858404#M300676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you share the sample qvw you are working with?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Apr 2015 16:49:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/problem-with-stddev-and-median/m-p/858404#M300676</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-04-17T16:49:26Z</dc:date>
    </item>
  </channel>
</rss>

