<?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: Mathematical formula using Valueloop in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Mathematical-formula-using-Valueloop/m-p/1192003#M385069</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you can use a non-constant field value like Agents as argument to Valueloop().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: Not quite sure what calculation you want to do using the Valueloop() method, and I don't really know if it's a safe thing if you are using more than one valueloop() with different ranges in the same aggregation function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides this, the calculation is performed as long as you select an agent:&lt;/P&gt;&lt;P&gt;=sum(pow([Intensity],Valueloop(0,[Agents]-1)))/ Sum(fact(Valueloop(0,10)))&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2016-10-25 12_39_02-QlikView x64 - [C__Users_s.wuehl_Downloads_Test_2.qvw_].png" class="jive-image image-1" src="/legacyfs/online/141847_2016-10-25 12_39_02-QlikView x64 - [C__Users_s.wuehl_Downloads_Test_2.qvw_].png" style="height: 107px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 25 Oct 2016 09:20:27 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2016-10-25T09:20:27Z</dc:date>
    <item>
      <title>Mathematical formula using Valueloop</title>
      <link>https://community.qlik.com/t5/QlikView/Mathematical-formula-using-Valueloop/m-p/1192002#M385068</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having an issue with a formula (Please view attached qvw sample)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my formula:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=sum(pow([Intensity],Valueloop(0,[Agents]-1))/fact(Valueloop(0,10)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the expression tab it says that the Intensity column in my table does not exist but it does exist as per illustrated in my qvw.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However when I replace the Column [Intensity] by a number, lets say 5 the formula seems to be working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea on to how to resolve this problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hasvine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 09:06:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mathematical-formula-using-Valueloop/m-p/1192002#M385068</guid>
      <dc:creator />
      <dc:date>2016-10-25T09:06:25Z</dc:date>
    </item>
    <item>
      <title>Re: Mathematical formula using Valueloop</title>
      <link>https://community.qlik.com/t5/QlikView/Mathematical-formula-using-Valueloop/m-p/1192003#M385069</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you can use a non-constant field value like Agents as argument to Valueloop().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;edit: Not quite sure what calculation you want to do using the Valueloop() method, and I don't really know if it's a safe thing if you are using more than one valueloop() with different ranges in the same aggregation function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides this, the calculation is performed as long as you select an agent:&lt;/P&gt;&lt;P&gt;=sum(pow([Intensity],Valueloop(0,[Agents]-1)))/ Sum(fact(Valueloop(0,10)))&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2016-10-25 12_39_02-QlikView x64 - [C__Users_s.wuehl_Downloads_Test_2.qvw_].png" class="jive-image image-1" src="/legacyfs/online/141847_2016-10-25 12_39_02-QlikView x64 - [C__Users_s.wuehl_Downloads_Test_2.qvw_].png" style="height: 107px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 25 Oct 2016 09:20:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mathematical-formula-using-Valueloop/m-p/1192003#M385069</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-10-25T09:20:27Z</dc:date>
    </item>
    <item>
      <title>Re: Mathematical formula using Valueloop</title>
      <link>https://community.qlik.com/t5/QlikView/Mathematical-formula-using-Valueloop/m-p/1192004#M385070</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help. Actually my real expression to calculate Intensity and Agents are long.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Intensity:&lt;/P&gt;&lt;P&gt;((Count(ID)/Count(DISTINCT(Date)))*(Interval((Sum({&amp;lt;FirstAgent={'&amp;lt;&amp;gt;0'}&amp;gt;}conv) + (Sum({&amp;lt;FirstAgent={'&amp;lt;&amp;gt;0'}&amp;gt;} wrap)))/ Count({&amp;lt;FirstAgent={'&amp;lt;&amp;gt;0'}&amp;gt;}ID),'ss')*86400)//vP)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Agents:&lt;/P&gt;&lt;P&gt;(Count(DISTINCT {&amp;lt;FirstAgent={'&amp;lt;&amp;gt;0'}&amp;gt;}(Agent))/Count(DISTINCT(Date)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I did on the sample was just to understand why the expression "&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px;"&gt;=sum(pow([Intensity],Valueloop(0,[Agents]-1))/fact(Valueloop(0,10)))&lt;/SPAN&gt;" was not functioning.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to break the formula down to identify the problem but it is still not working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I replaced the [Intensity] by the expression to calculate the Intensity but still no luck:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(pow(((Count(ID)/Count(DISTINCT(Date)))*(Interval((Sum({&amp;lt;FirstAgent={'&amp;lt;&amp;gt;0'}&amp;gt;}conv) + (Sum({&amp;lt;FirstAgent={'&amp;lt;&amp;gt;0'}&amp;gt;} wrap)))/ Count({&amp;lt;FirstAgent={'&amp;lt;&amp;gt;0'}&amp;gt;}ID),'ss')*86400)/vP),Valueloop(0,1)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My Original formula is as follows and the part highlighted in yellow is what I am unable to do on qlikview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="E_for.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/141999_E_for.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any idea? Is it possible to perform on qlikview.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a kind of technical support who can help me on this if I cannot find the answer on the qlikview community?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many Thanks &amp;amp; Kind Regards,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hasvine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2016 11:15:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mathematical-formula-using-Valueloop/m-p/1192004#M385070</guid>
      <dc:creator />
      <dc:date>2016-10-26T11:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Mathematical formula using Valueloop</title>
      <link>https://community.qlik.com/t5/QlikView/Mathematical-formula-using-Valueloop/m-p/1192005#M385071</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You are embedding aggregation functions inside other aggregation functions, which is only possible when using advanced aggregation (aggr() function) - or the TOTAL qualifier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Besides this:&lt;/P&gt;&lt;P&gt;-&amp;nbsp; Do you need to be able to evaluate the expression in the context of your chart dimensions, i.e. are m, u parameters depending on your chart dimensions? &lt;/P&gt;&lt;P&gt;- If so, then I think you will run into troubles using the Valueloop() method, since Valueloop() needs constant parameter in the scope of your chart expression evaluation&lt;/P&gt;&lt;P&gt;- Are you maybe able to calculate your formula in the script, or do it need to be sensitive to selections?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can contact Qlik or a Qlik partner to ask for (probably paid) technical support. You can find contact addresses in your region on the Qlik.com web site.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Oct 2016 11:46:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Mathematical-formula-using-Valueloop/m-p/1192005#M385071</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2016-10-26T11:46:53Z</dc:date>
    </item>
  </channel>
</rss>

