<?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 Cummulative sum of spend comparison with variable in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Cummulative-sum-of-spend-comparison-with-variable/m-p/46573#M7745</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 have one straight table and i need to incorporate an input box so that user could give an input basis the budget requirement. I need that if the use has input 10,000,000, the straight table should show the number of spots/ iterations till the time it is &amp;lt;= to the budget input by the user. As the calculations are on the expression level and&amp;nbsp; as we cannot incorporate the DO while and for next loop in the expression level. Please suggest me a solution relevant to the expression level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help would be highly appreciable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Owais Sarwar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Apr 2018 05:42:54 GMT</pubDate>
    <dc:creator>owais_sarwar</dc:creator>
    <dc:date>2018-04-17T05:42:54Z</dc:date>
    <item>
      <title>Cummulative sum of spend comparison with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Cummulative-sum-of-spend-comparison-with-variable/m-p/46573#M7745</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 have one straight table and i need to incorporate an input box so that user could give an input basis the budget requirement. I need that if the use has input 10,000,000, the straight table should show the number of spots/ iterations till the time it is &amp;lt;= to the budget input by the user. As the calculations are on the expression level and&amp;nbsp; as we cannot incorporate the DO while and for next loop in the expression level. Please suggest me a solution relevant to the expression level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your help would be highly appreciable.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Owais Sarwar.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2018 05:42:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cummulative-sum-of-spend-comparison-with-variable/m-p/46573#M7745</guid>
      <dc:creator>owais_sarwar</dc:creator>
      <dc:date>2018-04-17T05:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Cummulative sum of spend comparison with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Cummulative-sum-of-spend-comparison-with-variable/m-p/46574#M7746</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The input by the user can be treated as a constant and as such you can use it in any row level calculations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you clarify what you mean by spots/iterations please? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you you have to generate a variable number of rows based on some condition that involves the input from the user?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you could give us an example on how it would or should look like maybe it's possible for the community to give you good guidance....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2018 05:54:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cummulative-sum-of-spend-comparison-with-variable/m-p/46574#M7746</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-04-17T05:54:58Z</dc:date>
    </item>
    <item>
      <title>Re: Cummulative sum of spend comparison with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Cummulative-sum-of-spend-comparison-with-variable/m-p/46575#M7747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Petter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below attached is the picture of the straight table and an input box. I need to implement that if the user input the budget in the input box. The&amp;nbsp; straight table should show the rows till the time it reaches the Sum(Bugdet) &amp;lt;= VBudget. In other words may be i need the running total till the condition reaches. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If have written the set expression with if statement i.e.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(Num(Sum([Rate]/2)) &amp;lt; $(VBudget),Num(Sum([Rate]/2),'#,##0'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But, it is showing the sum of budget &amp;lt;= to the input (VBudget) in each row rather than the total Budget &amp;lt;= Input. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Example.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/199815_Example.png" style="height: 204px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2018 06:30:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cummulative-sum-of-spend-comparison-with-variable/m-p/46575#M7747</guid>
      <dc:creator>owais_sarwar</dc:creator>
      <dc:date>2018-04-17T06:30:10Z</dc:date>
    </item>
    <item>
      <title>Re: Cummulative sum of spend comparison with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Cummulative-sum-of-spend-comparison-with-variable/m-p/46576#M7748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;RangeSum( Above(TOTAL Sum([Rate]/2) , 0 , RowNo(TOTAL))) &amp;lt;= VBudget &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is important that the table is sorted correctly so it makes totals that make sense. You should turn of dynamic sorting for the table and give a fixed sorting order.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Above() inter-record function can pick one or more rows above in the chart. It takes three parameters. The expression to calculate over the number of rows that start at the position which the second parameter specify which is 0 (current row) and takes as many rows as the third parameters specify .... RowNo(TOTAL) which returns the current row - which is the number of values you want to sum&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2018 08:45:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cummulative-sum-of-spend-comparison-with-variable/m-p/46576#M7748</guid>
      <dc:creator>petter</dc:creator>
      <dc:date>2018-04-17T08:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: Cummulative sum of spend comparison with variable</title>
      <link>https://community.qlik.com/t5/QlikView/Cummulative-sum-of-spend-comparison-with-variable/m-p/46577#M7749</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Petter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your logic behind the expression is absoutely right. But i am unable to figure out why this expression is still not working. Attached is the screenshot. It has been stuck for so long and i have already closed it forcibly several times. The expression behind this is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;IF(RangeSum( Above(TOTAL Sum([Rate]/2) , 0 , RowNo(TOTAL))) &amp;lt;= VBudget,&amp;nbsp; Num(&lt;STRONG&gt;Sum([Rate]/2)))&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Also, as per your instructions, i have unchecked the 'Allow interactive sort' and have only checked numeric on the measure.&lt;STRONG&gt;&lt;STRONG&gt; &lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have tested it on a small scale and it was working perfectly.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Please tell me some way out so that i could pursue.&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Exp Not Working.png" class="jive-image image-1" src="/legacyfs/online/199852_Exp Not Working.png" style="height: 194px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2018 10:51:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Cummulative-sum-of-spend-comparison-with-variable/m-p/46577#M7749</guid>
      <dc:creator>owais_sarwar</dc:creator>
      <dc:date>2018-04-17T10:51:10Z</dc:date>
    </item>
  </channel>
</rss>

