<?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: Nested expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306751#M826760</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you are right &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 14 Jul 2017 12:38:21 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-07-14T12:38:21Z</dc:date>
    <item>
      <title>Nested expression</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306743#M826752</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to write expression Avg(sum(x)) while creating a measure but am unable to do so.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306743#M826752</guid>
      <dc:creator>siddharthsoam</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Nested expression</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306744#M826753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You will need to add Aggr() in between them&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avg(Aggr(Sum(x), ListOfDimensions))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 11:53:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306744#M826753</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-07-14T11:53:13Z</dc:date>
    </item>
    <item>
      <title>Re: Nested expression</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306745#M826754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please elaborate listofdimensions by a working example&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 12:09:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306745#M826754</guid>
      <dc:creator>siddharthsoam</dc:creator>
      <dc:date>2017-07-14T12:09:55Z</dc:date>
    </item>
    <item>
      <title>Re: Nested expression</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306746#M826755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here is an example&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Country, State, Population&lt;/P&gt;&lt;P&gt;US, NY, 10&lt;/P&gt;&lt;P&gt;US, NJ, 16&lt;/P&gt;&lt;P&gt;IND, DE, 20&lt;/P&gt;&lt;P&gt;IND, MU, 18&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now lets say your goal is to get the Sum by each country and then display the average in a text box&lt;/P&gt;&lt;P&gt;Avg(Aggr(Sum(Population), Country&lt;SPAN style="text-decoration: line-through;"&gt;, State&lt;/SPAN&gt;))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;the above will give you (10+16) + (20 + 18) divided by 2 =&amp;gt; 32&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 12:15:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306746#M826755</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-07-14T12:15:08Z</dc:date>
    </item>
    <item>
      <title>Re: Nested expression</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306747#M826756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try just Avg(x)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 12:17:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306747#M826756</guid>
      <dc:creator>vvvvvvizard</dc:creator>
      <dc:date>2017-07-14T12:17:18Z</dc:date>
    </item>
    <item>
      <title>Re: Nested expression</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306748#M826757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;Maybe &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Avg(Aggr(Sum(Population), Country&lt;SPAN style="text-decoration: line-through;"&gt;, State&lt;/SPAN&gt;))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;= 32 ?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 12:21:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306748#M826757</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-07-14T12:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: Nested expression</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306749#M826758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Siddharth,&lt;/P&gt;&lt;P&gt;Sunny's dead right (as usual) suggesting use of the Aggr function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Consider this straight table:&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Country&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Sum(Population)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TD bgcolor="#f5f5f5"&gt; &lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;STRONG&gt;64 &lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;IND&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;38&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;US&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;26&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we change the total mode to Avg in the expressions tab we get this&lt;/P&gt;&lt;TABLE bgcolor="#ffffff" border="1" cellpadding="2" cellspacing="0" style="font-size: 9pt;"&gt;&lt;TBODY&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Country&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;TH nowrap="nowrap"&gt;&lt;SPAN style="color: #363636;"&gt;&lt;STRONG&gt;Sum(Population)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR bgcolor="#f5f5f5"&gt;&lt;TD bgcolor="#f5f5f5"&gt; &lt;/TD&gt;&lt;TD bgcolor="#f5f5f5"&gt;&lt;STRONG&gt;32 &lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;IND&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;38&lt;/SPAN&gt; &lt;/TD&gt;&lt;/TR&gt;&lt;TR bgcolor="#ffffff"&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;US&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD bgcolor="#ffffff"&gt;&lt;SPAN style="color: #363636;"&gt;26&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The straight table gives you the answer you want, 32.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Aggr(sum(Population), Country)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can be thought of somehow creating an in-memory straight table with dimension Country and expression sum(Population).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we wrap this in Avg() :&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Avg(Aggr(sum(Population), Country))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;that's like setting the Total Mode of a straight table to Avg and this will return the answer we're looking for in a textbox.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Aggr is incredibly useful! &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;cheers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Andrew&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 12:30:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306749#M826758</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-07-14T12:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: Nested expression</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306750#M826759</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sidharth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you want it to group by country wise&amp;nbsp; then use below exp:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Maybe &lt;/SPAN&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Avg(Aggr(Sum(Population), Country))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;If you want it to normal Avg&amp;nbsp; then use below &lt;/SPAN&gt;exp&lt;SPAN style="font-size: 13.3333px;"&gt;:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Avg(population)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Arvind Patil&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 12:32:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306750#M826759</guid>
      <dc:creator>arvind_patil</dc:creator>
      <dc:date>2017-07-14T12:32:50Z</dc:date>
    </item>
    <item>
      <title>Re: Nested expression</title>
      <link>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306751#M826760</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes you are right &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jul 2017 12:38:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Nested-expression/m-p/1306751#M826760</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-07-14T12:38:21Z</dc:date>
    </item>
  </channel>
</rss>

