<?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 Pick(Match()) inside Avg function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Pick-Match-inside-Avg-function/m-p/1156950#M377338</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using Pick(Match(Field, '1','2','3','4'.'5'), exp1,exp2,exp3,exo4,exp5)&amp;nbsp; in a line chart to show the productivity for 5 different sectors. Each expression inside the function uses a complex expression with variables. Now, I need to draw the average line inside the chart. When I use Avg() function with the above expression to calculate the average I get the message saying that "Nested aggregation not allowed". How can I get round this? My expression is&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg(&lt;SPAN style="font-size: 13.3333px;"&gt;Pick(Match(Field, '1','2','3','4'.'5'), exp1,exp2,exp3,exo4,exp5) &lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Aug 2016 15:04:30 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-08-23T15:04:30Z</dc:date>
    <item>
      <title>Pick(Match()) inside Avg function</title>
      <link>https://community.qlik.com/t5/QlikView/Pick-Match-inside-Avg-function/m-p/1156950#M377338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using Pick(Match(Field, '1','2','3','4'.'5'), exp1,exp2,exp3,exo4,exp5)&amp;nbsp; in a line chart to show the productivity for 5 different sectors. Each expression inside the function uses a complex expression with variables. Now, I need to draw the average line inside the chart. When I use Avg() function with the above expression to calculate the average I get the message saying that "Nested aggregation not allowed". How can I get round this? My expression is&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Avg(&lt;SPAN style="font-size: 13.3333px;"&gt;Pick(Match(Field, '1','2','3','4'.'5'), exp1,exp2,exp3,exo4,exp5) &lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 15:04:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pick-Match-inside-Avg-function/m-p/1156950#M377338</guid>
      <dc:creator />
      <dc:date>2016-08-23T15:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: Pick(Match()) inside Avg function</title>
      <link>https://community.qlik.com/t5/QlikView/Pick-Match-inside-Avg-function/m-p/1156951#M377339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;maybe this way:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Pick(Match(Field, '1','2','3','4'.'5'), Avg(exp1),Avg(exp2),Avg(exp3),Avg(exp4),Avg(exp5) &lt;/SPAN&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 16:31:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pick-Match-inside-Avg-function/m-p/1156951#M377339</guid>
      <dc:creator>jpenuliar</dc:creator>
      <dc:date>2016-08-23T16:31:05Z</dc:date>
    </item>
    <item>
      <title>Re: Pick(Match()) inside Avg function</title>
      <link>https://community.qlik.com/t5/QlikView/Pick-Match-inside-Avg-function/m-p/1156952#M377340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are your expressions containing the aggregate functions?&lt;/P&gt;&lt;P&gt;If yes then only "&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Nested aggregation not allowed&lt;/SPAN&gt;" error comes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Solution:&lt;/P&gt;&lt;P&gt;You have to use aggr along with the avg function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Avg(aggr(&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #000000;"&gt;Pick(Match(Field, '1','2','3','4'.'5'), exp1,exp2,exp3,exo4,exp5) ,DIMENSION FIELDS)&lt;/SPAN&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; 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: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Then only it will work.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; 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: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Post a sample app to show the functionality.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; 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: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Nitin&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Aug 2016 16:55:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Pick-Match-inside-Avg-function/m-p/1156952#M377340</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-08-23T16:55:39Z</dc:date>
    </item>
  </channel>
</rss>

