<?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: Aggr Function using Cyclic Groups in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Aggr-Function-using-Cyclic-Groups/m-p/158358#M33468</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep it's working. thank u&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Aug 2013 10:33:26 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-08-08T10:33:26Z</dc:date>
    <item>
      <title>Aggr Function using Cyclic Groups</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function-using-Cyclic-Groups/m-p/158353#M33463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Folks&lt;/P&gt;&lt;P&gt;I have a challenge for you all......&lt;/P&gt;&lt;P&gt;I have an expression in a straight table that calculates values according to current and prior fx rates and summarises by an investment name, the table has the investment name as a dimension and the following as an expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;=Num(&lt;BR /&gt; Sum(Aggr(&lt;BR /&gt; (&lt;BR /&gt; ( Sum ( _rFMV )&lt;BR /&gt; *&lt;BR /&gt; ( Round(Max(FX_toUSD_RepDate),0.000001) - Round(Max(FX_toUSD_CompDate),0.000001) ) )&lt;BR /&gt; /&lt;BR /&gt; Round(Max(FX_toUSD_RepDate),0.000001)&lt;BR /&gt; )&lt;BR /&gt; , RG_Investment, _pCCY&lt;BR /&gt; ))&lt;BR /&gt;&lt;BR /&gt; / vDivisor ,vNumberFormat&lt;BR /&gt; )&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Now the above works perfectly and gives me exactly the results I need.&lt;/P&gt;&lt;P&gt;The problem:&lt;/P&gt;&lt;P&gt;The straight table where I want to put this is using a cyclic group rather than the investment name, so the aggregation should go over the current active field of the cyclic group. I have created the following expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;=Num(&lt;BR /&gt; Sum(Aggr(&lt;BR /&gt; (&lt;BR /&gt; ( Sum ( _rFMV )&lt;BR /&gt; *&lt;BR /&gt; ( Round(Max(FX_toUSD_RepDate),0.000001) - Round(Max(FX_toUSD_CompDate),0.000001) ) )&lt;BR /&gt; /&lt;BR /&gt; Round(Max(FX_toUSD_RepDate),0.000001)&lt;BR /&gt; )&lt;BR /&gt; , GetCurrentField("XXX_CycleGroup_Valuations"), _pCCY&lt;BR /&gt; ))&lt;BR /&gt;&lt;BR /&gt; / vDivisor ,vNumberFormat&lt;BR /&gt; )&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;You will notice that the only difference between them is the use of GetCurrentField("XXX_CycleGroup_Valuations") in place of RG_Investment.&lt;/P&gt;&lt;P&gt;This expression produces results of zero across the board, and now I'm stuck, any help would be very much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2009 19:52:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function-using-Cyclic-Groups/m-p/158353#M33463</guid>
      <dc:creator />
      <dc:date>2009-11-19T19:52:07Z</dc:date>
    </item>
    <item>
      <title>Aggr Function using Cyclic Groups</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function-using-Cyclic-Groups/m-p/158354#M33464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Nigel,&lt;/P&gt;&lt;P&gt;I've tried make an example close to yours but you use a lot fields which I don't understan, however, I made my own example using the same filosofy like yours.&lt;/P&gt;&lt;P&gt;I think the sentence GetCurrentField("XXX_CycleGroup_Valuations") doesn't work because the function GetCurrentField returns a text (Field name) and not a Field as itself. So I found a possible solution, using something like if(GetCurrentField(MyGroup) = 'Key', Key, key2) for replacing the sentence. Check out my example and I hope you will understan it better.&lt;/P&gt;&lt;P&gt;The drawback is remembering add all fields included in the group now and in a future.&lt;/P&gt;&lt;P&gt;I hope this helps you.&lt;/P&gt;&lt;P&gt;Best regards.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2009 23:02:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function-using-Cyclic-Groups/m-p/158354#M33464</guid>
      <dc:creator />
      <dc:date>2009-11-19T23:02:06Z</dc:date>
    </item>
    <item>
      <title>Aggr Function using Cyclic Groups</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function-using-Cyclic-Groups/m-p/158355#M33465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Miguel&lt;/P&gt;&lt;P&gt;Thanks for the response, I had come to the same conclusion myself and have implemented your suggestion.&lt;/P&gt;&lt;P&gt;As you say, the problem is remembering in the future when I add fields to the group (but maybe I'll have left the company by then)!&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Nov 2009 23:15:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function-using-Cyclic-Groups/m-p/158355#M33465</guid>
      <dc:creator />
      <dc:date>2009-11-19T23:15:38Z</dc:date>
    </item>
    <item>
      <title>Aggr Function using Cyclic Groups</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function-using-Cyclic-Groups/m-p/158356#M33466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had a similar problem and the solution, at least to my problem, was very simple. I just used the cyclic group as a field. In your case just try to use&lt;/P&gt;&lt;PRE style="margin:0px;"&gt;[XXX_CycleGroup_Valuations] instead of GetCurrentField("XXX_CycleGroup_Valuations").&lt;BR /&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jan 2010 10:22:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function-using-Cyclic-Groups/m-p/158356#M33466</guid>
      <dc:creator />
      <dc:date>2010-01-19T10:22:51Z</dc:date>
    </item>
    <item>
      <title>Aggr Function using Cyclic Groups</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function-using-Cyclic-Groups/m-p/158357#M33467</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yup, agree with Bigakis, the answer in this case was very simple, just use the name of the cyclic group.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jan 2010 13:35:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function-using-Cyclic-Groups/m-p/158357#M33467</guid>
      <dc:creator />
      <dc:date>2010-01-19T13:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Aggr Function using Cyclic Groups</title>
      <link>https://community.qlik.com/t5/QlikView/Aggr-Function-using-Cyclic-Groups/m-p/158358#M33468</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yep it's working. thank u&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2013 10:33:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Aggr-Function-using-Cyclic-Groups/m-p/158358#M33468</guid>
      <dc:creator />
      <dc:date>2013-08-08T10:33:26Z</dc:date>
    </item>
  </channel>
</rss>

