<?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: Standard deviation (Stdev) over multiple dimensions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135830#M372831</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not &lt;STRONG&gt;or&lt;/STRONG&gt;, def. this &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 May 2016 15:36:43 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-05-24T15:36:43Z</dc:date>
    <item>
      <title>Standard deviation (Stdev) over multiple dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135827#M372828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm facing a bit of difficulty creating a set of expressions that together determine wether or not a revenue line falls between a certain bandwith. This bandwidth that I calculate is the standard deviation times &lt;EM&gt;x&lt;/EM&gt;. If the revenue line falls outside of that specific bandwidth the final expression should give back either a 1 (outside of bandwidth) or a 0 &lt;SPAN style="font-size: 13.3333px;"&gt;(inside of bandwidth) (see the chart below, red dot). To illustrate this method I've included a screenshot of the chart below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="screenshot_graph.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/125592_screenshot_graph.PNG" style="height: 262px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now I want to do the same calculations, but combined with a second dimension. The part that I'm stumbling over is the standard deviation function. This is the current expression in the chart above:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14641032302111794" jivemacro_uid="_14641032302111794" modifiedtitle="true"&gt;
&lt;P&gt;Stdev(TOTAL&lt;/P&gt;
&lt;P&gt;&amp;nbsp; aggr(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; sum({&amp;lt;Date={'&amp;gt;=$(vDate.Min)&amp;lt;=$(vDate.Max)'}, _Flag={0}, Check={'$(=MaxString(Check))'}&amp;gt;}Revenue)&lt;/P&gt;
&lt;P&gt;&amp;nbsp; ,&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Date&lt;/P&gt;
&lt;P&gt;&amp;nbsp; )&lt;/P&gt;
&lt;P&gt;) &lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now say I want to do the same calculation, but in a straight table with a second dimension, say Team. How do I get the Stdev function to work over all the dates in the expression above, but for each individual team?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 15:28:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135827#M372828</guid>
      <dc:creator />
      <dc:date>2016-05-24T15:28:53Z</dc:date>
    </item>
    <item>
      <title>Re: Standard deviation (Stdev) over multiple dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135828#M372829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;May be this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"&gt;&lt;SPAN style="color: black; font-style: inherit; font-weight: inherit; background-color: inherit;"&gt;&lt;STRONG style="color: #575757;"&gt;Stdev(TOTAL&amp;nbsp; &lt;SPAN style="color: #ff0000;"&gt;&amp;lt;Team&amp;gt;&lt;/SPAN&gt; A&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #575757;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-style: inherit; line-height: 1.5em;"&gt;ggr(S&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; line-height: 1.5em;"&gt;um({&amp;lt;Date={&lt;/SPAN&gt;&lt;SPAN class="string" style="font-style: inherit; line-height: 1.5em;"&gt;'&amp;gt;=$(vDate.Min)&amp;lt;=$(vDate.Max)'&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; line-height: 1.5em;"&gt;}, _Flag={&lt;/SPAN&gt;&lt;SPAN class="number" style="font-style: inherit; line-height: 1.5em;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; line-height: 1.5em;"&gt;}, Check={&lt;/SPAN&gt;&lt;SPAN class="string" style="font-style: inherit; line-height: 1.5em;"&gt;'$(=MaxString(Check))'&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; line-height: 1.5em;"&gt;}&amp;gt;} Revenue)&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; line-height: 1.5em;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; background-color: inherit;"&gt;Date&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="color: black; font-size: 9pt; font-style: inherit; font-weight: inherit; line-height: 1.5em;"&gt;&lt;STRONG style=": ; color: #575757; font-size: 10pt; font-family: arial, helvetica, sans-serif;"&gt;)) &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 15:32:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135828#M372829</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-24T15:32:11Z</dc:date>
    </item>
    <item>
      <title>Re: Standard deviation (Stdev) over multiple dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135829#M372830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="color: #575757; font-size: 13.3333px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;STRONG&gt;Or maybe:&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="color: #575757; font-size: 13.3333px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="color: #575757; font-size: 13.3333px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;STRONG&gt;Stdev(TOTAL &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #ff0000;"&gt;&amp;lt;Team&amp;gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 10pt;"&gt;&lt;SPAN style="color: #575757; font-size: 13.3333px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit; color: #ff0000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt; A&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-style: inherit; font-size: 13.3333px; font-family: inherit; font-weight: inherit;"&gt;&lt;STRONG&gt;ggr(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-size: 13.3333px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; S&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;um({&amp;lt;Date={&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;'&amp;gt;=$(vDate.Min)&amp;lt;=$(vDate.Max)'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;}, _Flag={&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;}, Check={&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;'$(=MaxString(Check))'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;}&amp;gt;} Revenue)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="font-size: 13.3333px; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;STRONG&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;, &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;Date, &lt;SPAN style="color: #ff6600;"&gt;Team&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-weight: inherit; font-style: inherit; font-family: inherit;"&gt;&lt;SPAN style="color: #575757; font-size: 10pt; font-style: inherit; font-family: inherit; font-weight: inherit;"&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 15:35:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135829#M372830</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-24T15:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: Standard deviation (Stdev) over multiple dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135830#M372831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not &lt;STRONG&gt;or&lt;/STRONG&gt;, def. this &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 May 2016 15:36:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135830#M372831</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-24T15:36:43Z</dc:date>
    </item>
    <item>
      <title>Re: Standard deviation (Stdev) over multiple dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135831#M372832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks @swuehl!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I had to make one last alteration so it doesn't output dates that I don't want in the set expression, but that worked!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stdev(TOTAL &amp;lt;Team&amp;gt;{&amp;lt;Date={"&amp;gt;=$(vDate.Min)&amp;lt;=$(vDate.Max)"}&amp;gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp; aggr(&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;S&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;um({&amp;lt;Date={&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;'&amp;gt;=$(vDate.Min)&amp;lt;=$(vDate.Max)'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;}, _Flag={&lt;/SPAN&gt;&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;}, Check={&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;'$(=MaxString(Check))'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 13.3333px; font-family: inherit;"&gt;}&amp;gt;} Revenue)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp; Date, Team&lt;/P&gt;&lt;P&gt;&amp;nbsp; )&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 07:20:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135831#M372832</guid>
      <dc:creator />
      <dc:date>2016-05-25T07:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: Standard deviation (Stdev) over multiple dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135832#M372833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would have thought that since the inner aggregation is restricted, you wouldn't need to again restrict the outer aggregation to get the stdev within your date range. But adding it just in case is never a bad idea.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would you be able to close this thread by marking your response as correct and may be Stefan's response as helpful.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-14806"&gt;Qlik Community Tip: Marking Replies as Correct or Helpful&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Sunny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 08:37:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135832#M372833</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-25T08:37:32Z</dc:date>
    </item>
    <item>
      <title>Re: Standard deviation (Stdev) over multiple dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135833#M372834</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think in this case it's necessary to avoid creating zero values for the not-wanted dates that result in a wrong std dev. It wouldn't be a problem for a outer Sum().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But this problem should have also been present in your original expression and setting, right, Maarten?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: latter assuming that no team made revenue on a date&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 08:41:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135833#M372834</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-25T08:41:51Z</dc:date>
    </item>
    <item>
      <title>Re: Standard deviation (Stdev) over multiple dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135834#M372835</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem didn't occur in the original expression, but I can't really explain why. I guess it's because all the calculations we're done over one dimension and adding a second dimension somehow expanded the possibilities in all the dates in my data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 08:48:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135834#M372835</guid>
      <dc:creator />
      <dc:date>2016-05-25T08:48:21Z</dc:date>
    </item>
    <item>
      <title>Re: Standard deviation (Stdev) over multiple dimensions</title>
      <link>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135835#M372836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, that's probably the reason.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 May 2016 10:21:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Standard-deviation-Stdev-over-multiple-dimensions/m-p/1135835#M372836</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-05-25T10:21:17Z</dc:date>
    </item>
  </channel>
</rss>

