<?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 Problem with using &amp;quot;getcurrentfield&amp;quot; function with &amp;quot;Aggr&amp;quot; in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217043#M70301</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've had a quick look and put together a top 5 list based on your dimension cycle group. I don't think you need to use the aggr function as the totals will be aggregated over the relevant dimension to start with.&lt;/P&gt;&lt;P&gt;If I have understood your question correctly I think most of what you need can be done using the properties in the straight table.&lt;/P&gt;&lt;P&gt;Have a look and see what you think&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 14 Apr 2011 21:59:27 GMT</pubDate>
    <dc:creator>chris_johnson</dc:creator>
    <dc:date>2011-04-14T21:59:27Z</dc:date>
    <item>
      <title>Problem with using "getcurrentfield" function with "Aggr"</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217042#M70300</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;I have the requirement to show the top 5 selection results based on cycle group selection. So i tried to use the getcurrentfield function in aggr funtion.But its not working as expected. I used below expression. If i replace getcurrentfield function with field name its working fine. Could some one help me how to fix this. Please see the attached QVW file to be clear.&lt;/P&gt;&lt;P&gt;Below expression is with getcurrentfield function:&lt;/P&gt;&lt;H2&gt;=if(aggr(rank(sum(Qty)),getcurrentfield(New))&amp;lt;5,getcurrentfield(New))&lt;/H2&gt;&lt;P&gt;Below expression with field name instead of getcurrentfield function.this is working fine.&lt;/P&gt;&lt;H2&gt;=if(aggr(rank(sum(Qty)),ID)&amp;lt;5,ID,'others')&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 19:31:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217042#M70300</guid>
      <dc:creator />
      <dc:date>2011-04-14T19:31:23Z</dc:date>
    </item>
    <item>
      <title>Problem with using "getcurrentfield" function with "Aggr"</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217043#M70301</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've had a quick look and put together a top 5 list based on your dimension cycle group. I don't think you need to use the aggr function as the totals will be aggregated over the relevant dimension to start with.&lt;/P&gt;&lt;P&gt;If I have understood your question correctly I think most of what you need can be done using the properties in the straight table.&lt;/P&gt;&lt;P&gt;Have a look and see what you think&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Chris&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 21:59:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217043#M70301</guid>
      <dc:creator>chris_johnson</dc:creator>
      <dc:date>2011-04-14T21:59:27Z</dc:date>
    </item>
    <item>
      <title>Problem with using "getcurrentfield" function with "Aggr"</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217044#M70302</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just use New instead of getcurrentfield(New). You can use a cyclic field just like any other field. You only need to fiddle with getcurrentfield() when you want a TEXT description of which field is current.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 22:07:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217044#M70302</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-04-14T22:07:48Z</dc:date>
    </item>
    <item>
      <title>Problem with using "getcurrentfield" function with "Aggr"</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217045#M70303</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much for the reply. &lt;IMG alt="Smile" src="http://community.qlik.com/emoticons/emotion-1.gif" /&gt;&lt;/P&gt;&lt;P&gt;Chris, The top 5 is not fixed number. Based on the user input number will change. So i used Aggr function.&lt;/P&gt;&lt;P&gt;John, I try to use the just cycle group name "New" without getcurrentfield function. its working fine but its not giving the option to select the other cycle dimentions. Its showing chart for only one fixed dimention. Please see the attached QVW.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 22:31:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217045#M70303</guid>
      <dc:creator />
      <dc:date>2011-04-14T22:31:26Z</dc:date>
    </item>
    <item>
      <title>Problem with using "getcurrentfield" function with "Aggr"</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217046#M70304</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Chris's approach is still good. Just replace the 5 with $(v_top). It does require locking the sort order, though, or you'll get the bottom five instead, for instance.&lt;/P&gt;&lt;P&gt;This is ugly, but as an alternative that doesn't require locking the sort order, you could create a different cyclic group. Add expressions instead of fields, one for each field. So in your example, put these expressions in a cyclic group:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;=if(aggr(rank(sum(Qty)),ID)&amp;lt;=$(v_top),ID,'other')&lt;BR /&gt;=if(aggr(rank(sum(Qty)),Month)&amp;lt;=$(v_top),Month,'other')&lt;/P&gt;&lt;P&gt;Label them as desired, then use that group instead. Seems to work.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 22:49:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217046#M70304</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-04-14T22:49:12Z</dc:date>
    </item>
    <item>
      <title>Problem with using "getcurrentfield" function with "Aggr"</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217047#M70305</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With straight table approach i cant show the others total. Above solution worked fine. I appriciate your help. Thankyou verymuch.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 22:59:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217047#M70305</guid>
      <dc:creator />
      <dc:date>2011-04-14T22:59:35Z</dc:date>
    </item>
    <item>
      <title>Problem with using "getcurrentfield" function with "Aggr"</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217048#M70306</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you mean there wasn't a number on the "others" line? I noticed that when I first tried it. It looks like the answer is to set the total mode to the sum of rows instead of expression total.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Apr 2011 23:23:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217048#M70306</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-04-14T23:23:25Z</dc:date>
    </item>
    <item>
      <title>Problem with using "getcurrentfield" function with "Aggr"</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217049#M70307</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes john, I was not able to see any number on others line. As you suggested, once i changed the totals mode to sum of rows,its working fine. Thanks for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 00:00:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217049#M70307</guid>
      <dc:creator />
      <dc:date>2011-04-15T00:00:51Z</dc:date>
    </item>
    <item>
      <title>Problem with using "getcurrentfield" function with "Aggr"</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217050#M70308</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; For future reference - Use dollar sign to get the string value of the currentfield:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(aggr(rank(sum(Qty)),$(=getcurrentfield(New)))&amp;lt;5,$(=getcurrentfield(New)),'Others')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Jun 2011 12:08:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-using-quot-getcurrentfield-quot-function-with-quot/m-p/217050#M70308</guid>
      <dc:creator>nathanfurby</dc:creator>
      <dc:date>2011-06-03T12:08:08Z</dc:date>
    </item>
  </channel>
</rss>

