<?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 how to use a for loop in expression for a chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/how-to-use-a-for-loop-in-expression-for-a-chart/m-p/299730#M586828</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that the 'for loop' calculation is not available for use in the edit expression box. However you can use set analysis expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your calculations are complex, it is advisabe to do them in the load script. If the calculations depend on the selections made by the user, you need to become creative. You can group your calculations into two parts, user-input-independent and user-input-dependent. In the user-input-independent group, you should try to calculate either the final results to display/use in the charts/chart-expressions or intermediate results for use by the user-input-dependent group to arrive at the final numbers for use in the charts/chart-expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jun 2011 18:37:16 GMT</pubDate>
    <dc:creator>nagaiank</dc:creator>
    <dc:date>2011-06-17T18:37:16Z</dc:date>
    <item>
      <title>how to use a for loop in expression for a chart</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-use-a-for-loop-in-expression-for-a-chart/m-p/299729#M586827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a requirement where I have to loop though the avaiable selections from a list box, and then do a calculation. &lt;/P&gt;&lt;P&gt;Can some one please guide me on how to use the for loop in the edit expression box of a chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2011 17:55:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-use-a-for-loop-in-expression-for-a-chart/m-p/299729#M586827</guid>
      <dc:creator />
      <dc:date>2011-06-17T17:55:00Z</dc:date>
    </item>
    <item>
      <title>how to use a for loop in expression for a chart</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-use-a-for-loop-in-expression-for-a-chart/m-p/299730#M586828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think that the 'for loop' calculation is not available for use in the edit expression box. However you can use set analysis expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If your calculations are complex, it is advisabe to do them in the load script. If the calculations depend on the selections made by the user, you need to become creative. You can group your calculations into two parts, user-input-independent and user-input-dependent. In the user-input-independent group, you should try to calculate either the final results to display/use in the charts/chart-expressions or intermediate results for use by the user-input-dependent group to arrive at the final numbers for use in the charts/chart-expressions.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jun 2011 18:37:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-use-a-for-loop-in-expression-for-a-chart/m-p/299730#M586828</guid>
      <dc:creator>nagaiank</dc:creator>
      <dc:date>2011-06-17T18:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to use a for loop in expression for a chart</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-use-a-for-loop-in-expression-for-a-chart/m-p/299731#M586829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Right, you don't do a for loop in an expression.&amp;nbsp; You're thinking procedurally, which is not how the expressions operate.&amp;nbsp; But your answer MIGHT be trivial.&amp;nbsp; If, for instance, you had a chart with customer as the dimension, and you wanted to execute this for loop in every cell in the chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;total quantity = 0&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;for each order that the customer on this row has placed&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; add ordered quantity to total quantity&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;next&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;display total quantity&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's just this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-family: courier new,courier;"&gt;sum("ordered quantity")&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That's probably not what you're asking, but you're going to have to be a lot more explicit if you want anyone answering your question to be more explicit.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jun 2011 00:12:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-use-a-for-loop-in-expression-for-a-chart/m-p/299731#M586829</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-06-18T00:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to use a for loop in expression for a chart</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-use-a-for-loop-in-expression-for-a-chart/m-p/299732#M586830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Basically the whole chart can be seen as a big for loop over its dimension(s), i think you could also consider the use of the Aggr function in an expression as a for loop.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 18 Jun 2011 08:30:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-use-a-for-loop-in-expression-for-a-chart/m-p/299732#M586830</guid>
      <dc:creator>kji</dc:creator>
      <dc:date>2011-06-18T08:30:28Z</dc:date>
    </item>
  </channel>
</rss>

