<?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 Help with Top N with avg(aggr(sum....] function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Help-with-Top-N-with-avg-aggr-sum-function/m-p/119825#M756566</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I currently have a cyclic group with YearMonth, YearWeek, Date as dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I have the&amp;nbsp; following simple expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Avg(Aggr(Sum({&amp;lt;OrderType={PurchaseOrder}&amp;gt;} ValueEUR), Date))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which effectively gives me the daily (Date) average sum of ValueEUR, which works great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now I also have the field Country. So I want a graph that shows me which top 5 countries had the biggest daily average of ValueEUR, using the expression above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I add Country as second dimension under the cyclic time group, I, whilst also enabling "show only largest 5 values" under dimension limits for Country,&amp;nbsp; only get 1 country to show up in the graph ??? I don't understand why it doesn't work. Do I also need to use rank function in the expression or something? If so, how?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>joeallen</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Help with Top N with avg(aggr(sum....] function</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Top-N-with-avg-aggr-sum-function/m-p/119825#M756566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I currently have a cyclic group with YearMonth, YearWeek, Date as dimension.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I have the&amp;nbsp; following simple expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Avg(Aggr(Sum({&amp;lt;OrderType={PurchaseOrder}&amp;gt;} ValueEUR), Date))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Which effectively gives me the daily (Date) average sum of ValueEUR, which works great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now I also have the field Country. So I want a graph that shows me which top 5 countries had the biggest daily average of ValueEUR, using the expression above.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I add Country as second dimension under the cyclic time group, I, whilst also enabling "show only largest 5 values" under dimension limits for Country,&amp;nbsp; only get 1 country to show up in the graph ??? I don't understand why it doesn't work. Do I also need to use rank function in the expression or something? If so, how?&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/Help-with-Top-N-with-avg-aggr-sum-function/m-p/119825#M756566</guid>
      <dc:creator>joeallen</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Top N with avg(aggr(sum....] function</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Top-N-with-avg-aggr-sum-function/m-p/119826#M756567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/274815"&gt;joeallen&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will it be possible to share sample qvw to understand the issue better?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Seems like its a problem because of the current expression, which aggregates ValueEUR by Date. When you add Country to the dimension, it might not be calculating correctly. You may have to add another expression for Country as:&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;=Avg(Aggr(Sum({&amp;lt;OrderType={PurchaseOrder}&amp;gt;} ValueEUR), Country))&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;However it would be easier to identify the issue if we can look at the sample QVW.&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;Regards&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;Rajiv.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2018 12:37:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Top-N-with-avg-aggr-sum-function/m-p/119826#M756567</guid>
      <dc:creator>rajivmeher</dc:creator>
      <dc:date>2018-09-12T12:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Help with Top N with avg(aggr(sum....] function</title>
      <link>https://community.qlik.com/t5/QlikView/Help-with-Top-N-with-avg-aggr-sum-function/m-p/119827#M756568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joe,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To find Top 5 countries you can you rank function &lt;/P&gt;&lt;P&gt;May be like this.&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;=Avg(Aggr(sum({$&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;OrderType&lt;/SPAN&gt;={"=rank(sum({&amp;lt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;OrderType&lt;/SPAN&gt;={&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;PurchaseOrder&lt;/SPAN&gt;}&amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;ValueEUR&lt;/SPAN&gt;))&amp;lt;=5"}&amp;gt;} &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;ValueEUR&lt;/SPAN&gt;),Date))&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;And add Country in your &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;cyclic &lt;/SPAN&gt;group.&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;&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;It would be easier if you can share some sample data along expected output.&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;Best &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;Raman&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Sep 2018 15:20:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Help-with-Top-N-with-avg-aggr-sum-function/m-p/119827#M756568</guid>
      <dc:creator>raman_rastogi</dc:creator>
      <dc:date>2018-09-12T15:20:28Z</dc:date>
    </item>
  </channel>
</rss>

