<?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: Calculate the Average of a pre defined variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447590#M167031</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it is correct sorry I changed DELAYMIN to HISTORY&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 19 Nov 2012 17:29:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-11-19T17:29:11Z</dc:date>
    <item>
      <title>Calculate the Average of a pre defined variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447586#M167027</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have defined a variable which performs a calculation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I then want a seperate field to calculate the average of the output of the variable,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried using Avg($(HISTORY)) &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but to no avail&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2012 17:10:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447586#M167027</guid>
      <dc:creator />
      <dc:date>2012-11-19T17:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Average of a pre defined variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447587#M167028</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please note that you can't embed an aggregation function like sum() into another like avg() without using advanced aggregation function aggr().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So if you variable expands to something like sum(Value), this will not be a valid expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;avg(sum(Value))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And if your variable expands to a result, i.e. a number already, there is no need to use avg().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So how have you defined your variable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2012 17:14:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447587#M167028</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-19T17:14:39Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Average of a pre defined variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447588#M167029</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG __jive_id="25321" class="jive-image" alt="1.png" src="https://community.qlik.com/legacyfs/online/25321_1.png" /&gt;&lt;/P&gt;&lt;P&gt;Sorry I am still getting to grips with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this the correct information you have requested?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2012 17:20:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447588#M167029</guid>
      <dc:creator />
      <dc:date>2012-11-19T17:20:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Average of a pre defined variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447589#M167030</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can't see a variable named HISTORY, so I would assume no.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2012 17:23:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447589#M167030</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-19T17:23:21Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Average of a pre defined variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447590#M167031</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;it is correct sorry I changed DELAYMIN to HISTORY&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2012 17:29:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447590#M167031</guid>
      <dc:creator />
      <dc:date>2012-11-19T17:29:11Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Average of a pre defined variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447591#M167032</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG __jive_id="25323" class="jive-image-thumbnail jive-image" onclick="" alt="2.png" src="https://community.qlik.com/legacyfs/online/25323_2.png" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2012 17:48:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447591#M167032</guid>
      <dc:creator />
      <dc:date>2012-11-19T17:48:23Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Average of a pre defined variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447592#M167033</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please check &lt;/P&gt;&lt;P&gt;&lt;A class="loading active_link" href="http://www.qlikfix.com/2011/06/08/not-all-variables-are-created-equal/" title="http://www.qlikfix.com/2011/06/08/not-all-variables-are-created-equal/"&gt;http://www.qlikfix.com/2011/06/08/not-all-variables-are-created-equal/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;for the difference in using an equal sign or not using one in a variable definition. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In which context do you want to use your new expression? In a chart expression? So you may want to try with creating a variable with no equal sign&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Minute(frac(Timestamp1)-frac(Timestamp2))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(and please check the type of brackets you are using, I would suggest using always round brackets () with functions like frac() )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2012 17:58:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447592#M167033</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-19T17:58:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Average of a pre defined variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447593#M167034</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the link.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have amended the variable as per your advice.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want the new expression to use the output result of HISTORY to provide the average. If there is another way I have no idea&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Nov 2012 18:12:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447593#M167034</guid>
      <dc:creator />
      <dc:date>2012-11-19T18:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Average of a pre defined variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447594#M167035</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is anyone able to provide any additional assistance?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Nov 2012 16:09:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447594#M167035</guid>
      <dc:creator />
      <dc:date>2012-11-22T16:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Average of a pre defined variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447595#M167036</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would be much easier to help you if you could post a small sample app. Still too many unknowns for me to understand your issue.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Nov 2012 11:15:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447595#M167036</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-23T11:15:42Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Average of a pre defined variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447596#M167037</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have attached an example of the data I am working with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to find the average of Delay Mins, which has the variable HISTORY.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and I am then going to try and count the data with delay mins of +15&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 09:14:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447596#M167037</guid>
      <dc:creator />
      <dc:date>2012-11-29T09:14:06Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Average of a pre defined variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447597#M167038</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi this has been resolved by &lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" href="https://community.qlik.com/people/jfkinspari" id="jive-963607566881898336332" style="background-color: #ffffff; font-size: 12px; color: #007fc0; text-decoration: initial; font-weight: bold; font-family: Arial; text-align: center;"&gt;Jens Frederik Kristiansen&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #737373; font-family: Arial; background-color: #ffffff;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #0000ff;"&gt;interval&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #0000ff;"&gt;avg&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #0000ff;"&gt;aggr&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;((&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #0000ff;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #800000;"&gt;CHKS&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;)-&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #0000ff;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #800000;"&gt;SCH&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #800000;"&gt;[FLT-NO]&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; font-family: Arial; color: #800000;"&gt;DATE&lt;/SPAN&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;)),'mm')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; font-size: 8pt; color: #737373; font-family: Arial;"&gt;Tthanks for everyones assistance&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 11:04:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447597#M167038</guid>
      <dc:creator />
      <dc:date>2012-11-29T11:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Average of a pre defined variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447598#M167039</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good to hear that this is finally solved.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you are using the expression in a table chart (like in your sample file), you probably don't need the advanced aggregation, this should get you the same result (in your table Avg Delay Mins):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=interval(avg(CHKS-SCH),'mm')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 11:17:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447598#M167039</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-11-29T11:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate the Average of a pre defined variable</title>
      <link>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447599#M167040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Swuehl,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the info I have added an additional column to compare the results and you are correct it populates the same output thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 11:21:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculate-the-Average-of-a-pre-defined-variable/m-p/447599#M167040</guid>
      <dc:creator />
      <dc:date>2012-11-29T11:21:30Z</dc:date>
    </item>
  </channel>
</rss>

