<?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 Long IF-formula in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Long-IF-formula/m-p/312531#M1197088</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This produces the same result, and might be fast enough:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;rangesum(above(count(RMA_NO),0,rowno()))/count(total &amp;lt;Week,COUNTRY, RMA_CENTER&amp;gt;RMA_NO)&lt;/P&gt;&lt;P&gt;If it isn't fast enough, I still wouldn't do the accumulation itself in the script. Always (if possible) keep your data at the lowest level of detail and do no script accumulations.&lt;/P&gt;&lt;P&gt;But you could create a data structure in the script to allow QlikView to do this more efficiently (and not require you to have every row in the table and in the right sequence, which is what above() requires).&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;[TAT Group Accumulation]:&lt;BR /&gt;TAT Group Accum, Accum Type, TAT Group&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, None, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Full, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, None, 01 &amp;lt;= TAT &amp;lt;= 05&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Full, 01 &amp;lt;= TAT &amp;lt;= 05&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Full, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;05 &amp;lt; TAT &amp;lt;= 07, None, 05 &amp;lt; TAT &amp;lt;= 07&lt;BR /&gt;05 &amp;lt; TAT &amp;lt;= 07, Full, 05 &amp;lt; TAT &amp;lt;= 07&lt;BR /&gt;05 &amp;lt; TAT &amp;lt;= 07, Full, 01 &amp;lt;= TAT &amp;lt;= 05&lt;BR /&gt;05 &amp;lt; TAT &amp;lt;= 07, Full, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;etc.&lt;/P&gt;&lt;P&gt;Then you use TAT Group Accum instead of TAT Group in the chart.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Qty = count({&amp;lt;"Accum Type"={'None'}&amp;gt;} RMA_NO)&lt;BR /&gt;Contribution 3 = count({&amp;lt;"Accum Type"={'Full'}&amp;gt;} RMA_NO)&lt;BR /&gt; / count(total &amp;lt;Week,COUNTRY,RMA_CENTER&amp;gt; RMA_NO)&lt;/P&gt;&lt;P&gt;For that matter, you could have an Accum Type of 'Total' that did the same as the count(total...), allowing you to not have to specify the dimensions of your chart and to keep a consistent format in the expressions. Not sure it's worth it, but:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;[TAT Group Accumulation]:&lt;BR /&gt;TAT Group Accum, Accum Type, TAT Group&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, None, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Full, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Total, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Total, 01 &amp;lt;= TAT &amp;lt;= 05&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Total, 05 &amp;lt; TAT &amp;lt;= 07&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Total, 07 &amp;lt; TAT &amp;lt;= 10&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Total, 10 &amp;lt; TAT &amp;lt;= 15&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Total, 15 &amp;lt; TAT &amp;lt;= 20&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Total, Above 20&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, None, 01 &amp;lt;= TAT &amp;lt;= 05&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Full, 01 &amp;lt;= TAT &amp;lt;= 05&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Full, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Total, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Total, 01 &amp;lt;= TAT &amp;lt;= 05&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Total, 05 &amp;lt; TAT &amp;lt;= 07&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Total, 07 &amp;lt; TAT &amp;lt;= 10&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Total, 10 &amp;lt; TAT &amp;lt;= 15&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Total, 15 &amp;lt; TAT &amp;lt;= 20&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Total, Above 20&lt;BR /&gt;etc.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Qty = count({&amp;lt;"Accum Type"={'None'}&amp;gt;} RMA_NO)&lt;BR /&gt;Contribution 3 = count({&amp;lt;"Accum Type"={'Full'}&amp;gt;} RMA_NO)&lt;BR /&gt; / count({&amp;lt;"Accum Type"={'Total'}&amp;gt;} RMA_NO)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 12 Mar 2011 02:00:21 GMT</pubDate>
    <dc:creator>johnw</dc:creator>
    <dc:date>2011-03-12T02:00:21Z</dc:date>
    <item>
      <title>Long IF-formula</title>
      <link>https://community.qlik.com/t5/QlikView/Long-IF-formula/m-p/312528#M1197085</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;STRONG&gt;I need to count "cumulated contribution" - qty of RMA_NO in Total Qty per TAT Group.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;When I use formula below on big amount of data it makes it really slow. Could somebody help me with other solution?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;[TAT Group]&lt;/B&gt;='00 ≤ TAT ≤ 01',&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt; &lt;B&gt;RMA_NO&lt;/B&gt;),&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;(&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;[TAT Group]&lt;/B&gt;='01 ≤ TAT ≤ 05',&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;))&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;)),&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;(&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;[TAT Group]&lt;/B&gt;='05 &amp;lt; TAT ≤ 07',&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;))&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;))&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;),2),&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;[TAT Group]&lt;/B&gt;='07 &amp;lt; TAT ≤ 10',&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;))&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;))&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;),2)&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;),3),&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;[TAT Group]&lt;/B&gt;='10 &amp;lt; TAT ≤ 15',&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;))&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;))&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;),2)&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;),3)&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;),4),&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;[TAT Group]&lt;/B&gt;='15 &amp;lt; TAT ≤ 20',&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;))&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;))&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;),2)&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;),3)&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;),4)&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;),5),&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;&lt;B&gt;if&lt;/B&gt;(&lt;B&gt;[TAT Group]&lt;/B&gt;='Above 20',&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;))&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;))&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;),2)&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;),3)&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;),4)&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;),5)&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;+ &lt;B&gt;above&lt;/B&gt;(&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;RMA_NO&lt;/B&gt;)/&lt;B&gt;Count&lt;/B&gt; (&lt;B&gt;total&lt;/B&gt; &amp;lt;&lt;B&gt;Week&lt;/B&gt;,&lt;B&gt;COUNTRY&lt;/B&gt;, &lt;B&gt;RMA_CENTER&lt;/B&gt;&amp;gt;&lt;B&gt;RMA_NO&lt;/B&gt;),6)&lt;/P&gt;&lt;P style="line-height: normal; margin: 0in 0in 0pt; mso-layout-grid-align: none;"&gt;)))))))))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 11:28:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Long-IF-formula/m-p/312528#M1197085</guid>
      <dc:creator />
      <dc:date>2011-03-11T11:28:00Z</dc:date>
    </item>
    <item>
      <title>Long IF-formula</title>
      <link>https://community.qlik.com/t5/QlikView/Long-IF-formula/m-p/312529#M1197086</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;try to pre-calculate yours data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 15:35:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Long-IF-formula/m-p/312529#M1197086</guid>
      <dc:creator>pljsoftware</dc:creator>
      <dc:date>2011-03-11T15:35:30Z</dc:date>
    </item>
    <item>
      <title>Long IF-formula</title>
      <link>https://community.qlik.com/t5/QlikView/Long-IF-formula/m-p/312530#M1197087</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Could you please explain how can I do it?&lt;/P&gt;&lt;P&gt;Thx&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 11 Mar 2011 16:18:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Long-IF-formula/m-p/312530#M1197087</guid>
      <dc:creator />
      <dc:date>2011-03-11T16:18:04Z</dc:date>
    </item>
    <item>
      <title>Long IF-formula</title>
      <link>https://community.qlik.com/t5/QlikView/Long-IF-formula/m-p/312531#M1197088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This produces the same result, and might be fast enough:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;rangesum(above(count(RMA_NO),0,rowno()))/count(total &amp;lt;Week,COUNTRY, RMA_CENTER&amp;gt;RMA_NO)&lt;/P&gt;&lt;P&gt;If it isn't fast enough, I still wouldn't do the accumulation itself in the script. Always (if possible) keep your data at the lowest level of detail and do no script accumulations.&lt;/P&gt;&lt;P&gt;But you could create a data structure in the script to allow QlikView to do this more efficiently (and not require you to have every row in the table and in the right sequence, which is what above() requires).&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;[TAT Group Accumulation]:&lt;BR /&gt;TAT Group Accum, Accum Type, TAT Group&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, None, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Full, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, None, 01 &amp;lt;= TAT &amp;lt;= 05&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Full, 01 &amp;lt;= TAT &amp;lt;= 05&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Full, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;05 &amp;lt; TAT &amp;lt;= 07, None, 05 &amp;lt; TAT &amp;lt;= 07&lt;BR /&gt;05 &amp;lt; TAT &amp;lt;= 07, Full, 05 &amp;lt; TAT &amp;lt;= 07&lt;BR /&gt;05 &amp;lt; TAT &amp;lt;= 07, Full, 01 &amp;lt;= TAT &amp;lt;= 05&lt;BR /&gt;05 &amp;lt; TAT &amp;lt;= 07, Full, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;etc.&lt;/P&gt;&lt;P&gt;Then you use TAT Group Accum instead of TAT Group in the chart.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Qty = count({&amp;lt;"Accum Type"={'None'}&amp;gt;} RMA_NO)&lt;BR /&gt;Contribution 3 = count({&amp;lt;"Accum Type"={'Full'}&amp;gt;} RMA_NO)&lt;BR /&gt; / count(total &amp;lt;Week,COUNTRY,RMA_CENTER&amp;gt; RMA_NO)&lt;/P&gt;&lt;P&gt;For that matter, you could have an Accum Type of 'Total' that did the same as the count(total...), allowing you to not have to specify the dimensions of your chart and to keep a consistent format in the expressions. Not sure it's worth it, but:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;[TAT Group Accumulation]:&lt;BR /&gt;TAT Group Accum, Accum Type, TAT Group&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, None, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Full, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Total, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Total, 01 &amp;lt;= TAT &amp;lt;= 05&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Total, 05 &amp;lt; TAT &amp;lt;= 07&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Total, 07 &amp;lt; TAT &amp;lt;= 10&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Total, 10 &amp;lt; TAT &amp;lt;= 15&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Total, 15 &amp;lt; TAT &amp;lt;= 20&lt;BR /&gt;00 &amp;lt;= TAT &amp;lt;= 01, Total, Above 20&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, None, 01 &amp;lt;= TAT &amp;lt;= 05&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Full, 01 &amp;lt;= TAT &amp;lt;= 05&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Full, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Total, 00 &amp;lt;= TAT &amp;lt;= 01&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Total, 01 &amp;lt;= TAT &amp;lt;= 05&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Total, 05 &amp;lt; TAT &amp;lt;= 07&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Total, 07 &amp;lt; TAT &amp;lt;= 10&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Total, 10 &amp;lt; TAT &amp;lt;= 15&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Total, 15 &amp;lt; TAT &amp;lt;= 20&lt;BR /&gt;01 &amp;lt;= TAT &amp;lt;= 05, Total, Above 20&lt;BR /&gt;etc.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Qty = count({&amp;lt;"Accum Type"={'None'}&amp;gt;} RMA_NO)&lt;BR /&gt;Contribution 3 = count({&amp;lt;"Accum Type"={'Full'}&amp;gt;} RMA_NO)&lt;BR /&gt; / count({&amp;lt;"Accum Type"={'Total'}&amp;gt;} RMA_NO)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 12 Mar 2011 02:00:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Long-IF-formula/m-p/312531#M1197088</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-03-12T02:00:21Z</dc:date>
    </item>
  </channel>
</rss>

