<?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: Get Average from a table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Get-Average-from-a-table/m-p/523144#M1131515</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're calculating this average using an expression in the chart.&amp;nbsp; That means, you have to use the same expression to define your variable.&amp;nbsp; There are two options, depending on your needs:&lt;BR /&gt;1. You want this variable to be dynamic.&amp;nbsp; That is, selections change - variable changes.&amp;nbsp; In this case you have to define your variable in the Variables Overview as&lt;BR /&gt;=&amp;lt;expression&amp;gt;&lt;BR /&gt;2. You want to capture the value of the average at some moment, and it keeps the value until you decide to change it.&amp;nbsp; In this case, create a button or a text box with action "Set Variable", with the Value&lt;BR /&gt;=&amp;lt;expression&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Dec 2013 22:26:56 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-12-03T22:26:56Z</dc:date>
    <item>
      <title>Get Average from a table</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Average-from-a-table/m-p/523143#M1131514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to assign to a variable the value of a cell line of Average.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Exemple :&lt;/P&gt;&lt;P&gt;Dimension&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; value2&lt;/P&gt;&lt;P&gt;AAAAA&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;BBBBB&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1&lt;/P&gt;&lt;P&gt;CCCCC&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 30&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;AVG&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; 20&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The second value is calculated and i want to retrieve it.&lt;/P&gt;&lt;P&gt;how can I get this value ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Paul&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 20:25:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Average-from-a-table/m-p/523143#M1131514</guid>
      <dc:creator>paulcalvet</dc:creator>
      <dc:date>2013-12-03T20:25:38Z</dc:date>
    </item>
    <item>
      <title>Re: Get Average from a table</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Average-from-a-table/m-p/523144#M1131515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You're calculating this average using an expression in the chart.&amp;nbsp; That means, you have to use the same expression to define your variable.&amp;nbsp; There are two options, depending on your needs:&lt;BR /&gt;1. You want this variable to be dynamic.&amp;nbsp; That is, selections change - variable changes.&amp;nbsp; In this case you have to define your variable in the Variables Overview as&lt;BR /&gt;=&amp;lt;expression&amp;gt;&lt;BR /&gt;2. You want to capture the value of the average at some moment, and it keeps the value until you decide to change it.&amp;nbsp; In this case, create a button or a text box with action "Set Variable", with the Value&lt;BR /&gt;=&amp;lt;expression&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;BR /&gt;Michael&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 22:26:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Average-from-a-table/m-p/523144#M1131515</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-12-03T22:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Get Average from a table</title>
      <link>https://community.qlik.com/t5/QlikView/Get-Average-from-a-table/m-p/523145#M1131516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Paul,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I am understanding you correctly you want to store the calculated averages into variables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If that is the case then the approach would be something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 1:&lt;/P&gt;&lt;P&gt;- Create 2 variables,say vAvgValue1 and vAvgValue2&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Step 2:&lt;/P&gt;&lt;P&gt;- in your code&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TEMP: &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load num(avg(Value1) as Value1Average,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Load num(avg(Value2) as Value2Average&lt;/P&gt;&lt;P&gt;RESIDENT mytable;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LET vAvgValue1 = peek('Value1Average', 0,TEMP);&lt;/P&gt;&lt;P&gt;LET vAvgValue2 = peek('Value2Average', 0,TEMP);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DROP TABLE TEMP;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;&lt;P&gt;Alexis&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 22:54:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Get-Average-from-a-table/m-p/523145#M1131516</guid>
      <dc:creator>alexis</dc:creator>
      <dc:date>2013-12-03T22:54:59Z</dc:date>
    </item>
  </channel>
</rss>

