<?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: Weighted Standard Deviation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Weighted-Standard-Deviation/m-p/938567#M323881</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;can you attach the qvw with your straight table and the desired result for a particular example?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Sep 2015 08:18:48 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2015-09-01T08:18:48Z</dc:date>
    <item>
      <title>Weighted Standard Deviation</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-Standard-Deviation/m-p/938566#M323880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a straight table that is calculating weighted average and weighted standard deviation (weighted by visits).&amp;nbsp; When a selection is made in the straight table, the standard deviation calculates correctly.&amp;nbsp; However, if no selection is made then it aggregates across all rows and shows that aggregated number in the standard deviation cell for each row.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For &lt;STRONG&gt;weighted average&lt;/STRONG&gt; (which is calculating correctly), I used:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum([VISITS]*[VALUE])/sum([VISITS&lt;/STRONG&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;&lt;STRONG&gt;])&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Note that this did include TOTAL in the calculation initially.&amp;nbsp; Removing this resulted in the&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; correct calculation.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For &lt;STRONG&gt;weighted standard deviation&lt;/STRONG&gt;, I am using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sqrt(sum([VISITS]*sqr([VALUE]-sum( total [VALUE]*[VISITS])/sum(total [VISITS])))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;/sum([VISITS]))&lt;/STRONG&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I tried removing TOTAL from this calculation but it did not have the same effect as the&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; weighted average - It resulted in no calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas how to modify this weighted standard deviation formula so that it doesn't aggregate across all rows?&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Aug 2015 12:56:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-Standard-Deviation/m-p/938566#M323880</guid>
      <dc:creator />
      <dc:date>2015-08-31T12:56:17Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted Standard Deviation</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-Standard-Deviation/m-p/938567#M323881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;can you attach the qvw with your straight table and the desired result for a particular example?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2015 08:18:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-Standard-Deviation/m-p/938567#M323881</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-09-01T08:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Weighted Standard Deviation</title>
      <link>https://community.qlik.com/t5/QlikView/Weighted-Standard-Deviation/m-p/938568#M323882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Elena,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please find the qvw attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If no ID is selected, then the weighted standard deviation is way off base for each id.  However, selecting an ID shows the correct standard deviation.  For example, ID 100A, with no selections the weighted average is 14.25% and the weighted standard deviation is 54.68% (incorrect).  When 0100A is selected, the weighted average shows 3.61% (correct).  I am trying to modify the expression so that the weighted standard deviation is correct regardless of whether a selection is made (like the weighted average).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2015 12:41:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Weighted-Standard-Deviation/m-p/938568#M323882</guid>
      <dc:creator />
      <dc:date>2015-09-01T12:41:01Z</dc:date>
    </item>
  </channel>
</rss>

