<?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: Using functions across multiple aggregations in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-functions-across-multiple-aggregations/m-p/784498#M277675</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ramon and Shane, that's exactly what I was looking for!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Mar 2015 09:09:17 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-03-26T09:09:17Z</dc:date>
    <item>
      <title>Using functions across multiple aggregations</title>
      <link>https://community.qlik.com/t5/QlikView/Using-functions-across-multiple-aggregations/m-p/784493#M277670</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;I'm new to scripting in qlik and I'm currently building an app in Qlik Sense.&amp;nbsp; I'm wondering if its possible to use a function across multiple aggregations.&amp;nbsp; For example, I want to know how many standard deviations an average score in 2014 is from the average of yearly averages from 2008-2013.&amp;nbsp; Although I'm not keen on averaging averages, I have different populations being sample each year so it seems reasonable.&amp;nbsp; I have managed to get this to work but I've had to repeat the same set analysis lines over and over in finding the average between 2008-2013 when calculating the standard deviation.&amp;nbsp; I tried using the function stdev over the 2008-2013 aggregates, but that doesn't work.&amp;nbsp; I was also surprised that I couldn't square the differences between the 2014 average and historical average by putting the whole thing in brackets followed with ^2.&amp;nbsp; Is there a separate set of functions for use on aggregations, or do calculations across aggregates simply need to be coded?&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Apologies in advance if this has already been asked, I've been looking for for a few days on the forum but I couldn't find anything relevant.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Taylor&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 21:22:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-functions-across-multiple-aggregations/m-p/784493#M277670</guid>
      <dc:creator />
      <dc:date>2015-03-24T21:22:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using functions across multiple aggregations</title>
      <link>https://community.qlik.com/t5/QlikView/Using-functions-across-multiple-aggregations/m-p/784494#M277671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Taylor,&lt;/P&gt;&lt;P&gt;post your script or your qvw, please.&lt;/P&gt;&lt;P&gt;If you would explain through comments what is the result you want to reach, it could be easier to help you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Mar 2015 23:54:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-functions-across-multiple-aggregations/m-p/784494#M277671</guid>
      <dc:creator>mrossoit</dc:creator>
      <dc:date>2015-03-24T23:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: Using functions across multiple aggregations</title>
      <link>https://community.qlik.com/t5/QlikView/Using-functions-across-multiple-aggregations/m-p/784495#M277672</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I've attached my script.&amp;nbsp; OUTPUT is the measurement across the dimension YEAR.&amp;nbsp; In this script I'm dividing the difference between the average of 2014 and the average across averages 2008-2013 by the standard deviation of the average across averages 2008-2013.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is whether there is any easier way to script what I'm doing by using functions that work with the aggregates.&amp;nbsp; The following doesn't work but this is what I'm after r&lt;SPAN style="font-size: 13.3333330154419px;"&gt;ather than having to write out the formula completely&lt;/SPAN&gt;:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;stdev(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; avg({$&amp;lt;YEAR={2013}&amp;gt;}OUTPUT)+&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; avg({$&amp;lt;YEAR={2012}&amp;gt;}OUTPUT)+&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; avg({$&amp;lt;YEAR={2011}&amp;gt;}OUTPUT)+&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; avg({$&amp;lt;YEAR={2010}&amp;gt;}OUTPUT)+ &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; avg({$&amp;lt;YEAR={2009}&amp;gt;}OUTPUT)+&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; avg({$&amp;lt;YEAR={2008}&amp;gt;}OUTPUT)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2015 00:16:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-functions-across-multiple-aggregations/m-p/784495#M277672</guid>
      <dc:creator />
      <dc:date>2015-03-25T00:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: Using functions across multiple aggregations</title>
      <link>https://community.qlik.com/t5/QlikView/Using-functions-across-multiple-aggregations/m-p/784496#M277673</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;use Aggr&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/thread/38796"&gt;Aggr() function&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2015 03:31:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-functions-across-multiple-aggregations/m-p/784496#M277673</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2015-03-25T03:31:52Z</dc:date>
    </item>
    <item>
      <title>Re: Using functions across multiple aggregations</title>
      <link>https://community.qlik.com/t5/QlikView/Using-functions-across-multiple-aggregations/m-p/784497#M277674</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For your averages, can't you just use the average of the previous years:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;AVG({$ &amp;lt;Year="&amp;lt;={2013}"&amp;gt;} OUTPUT)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Mar 2015 03:39:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-functions-across-multiple-aggregations/m-p/784497#M277674</guid>
      <dc:creator>shanemichelon</dc:creator>
      <dc:date>2015-03-25T03:39:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using functions across multiple aggregations</title>
      <link>https://community.qlik.com/t5/QlikView/Using-functions-across-multiple-aggregations/m-p/784498#M277675</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ramon and Shane, that's exactly what I was looking for!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2015 09:09:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-functions-across-multiple-aggregations/m-p/784498#M277675</guid>
      <dc:creator />
      <dc:date>2015-03-26T09:09:17Z</dc:date>
    </item>
  </channel>
</rss>

