<?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: How to filter cumulative values in pivot table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-filter-cumulative-values-in-pivot-table/m-p/1769137#M718458</link>
    <description>&lt;P&gt;I have simplified the actual problem. The actual operation will involve other data. If I use a script to add a new week field, it is difficult to calculate with other data. I am not familiar with writing script calculations and cannot use it freely. Anyway, this is a new idea.Thank you!&lt;/P&gt;</description>
    <pubDate>Thu, 17 Dec 2020 06:25:11 GMT</pubDate>
    <dc:creator>Nora104</dc:creator>
    <dc:date>2020-12-17T06:25:11Z</dc:date>
    <item>
      <title>How to filter cumulative values in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-filter-cumulative-values-in-pivot-table/m-p/1768823#M718456</link>
      <description>&lt;P&gt;I use the formula in pivot table: rangesum(before(Sum(Qty),0,ColumnNo()))&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.png" style="width: 716px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/45729iFD2F8FF36FC4C763/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.png" alt="2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I want it to be like the below, only show value when Week&amp;gt;=4 and the min cumulative value&amp;lt;150:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3.png" style="width: 477px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/45733i9B5C07E37157F950/image-size/large?v=v2&amp;amp;px=999" role="button" title="3.png" alt="3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;But I use the formula:if(Week&amp;gt;=4 and rangesum(before(Sum(Qty),0,ColumnNo()))&amp;lt;150,rangesum(before(Sum(Qty),0,ColumnNo())),)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="4.png" style="width: 493px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/45734i9DEAC705E7E4B51D/image-size/large?v=v2&amp;amp;px=999" role="button" title="4.png" alt="4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;the Code 90811 Week6&amp;amp;Week7 value does not show.&lt;/P&gt;&lt;P&gt;I use the formula:&lt;/P&gt;&lt;P&gt;if(Week&amp;gt;=4&lt;BR /&gt;and min(aggr(rangesum(before(Sum(Qty),0,ColumnNo())),Week,Code))&amp;lt;150,&lt;BR /&gt;rangesum(before(Sum(Qty),0,ColumnNo()))&lt;BR /&gt;,)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1.png" style="width: 513px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/45735iDF6BDE81855E065C/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.png" alt="1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;the Code 90810 was showed...&lt;/P&gt;&lt;P&gt;How can I write the formula?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 07:45:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-filter-cumulative-values-in-pivot-table/m-p/1768823#M718456</guid>
      <dc:creator>Nora104</dc:creator>
      <dc:date>2020-12-16T07:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter cumulative values in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-filter-cumulative-values-in-pivot-table/m-p/1768991#M718457</link>
      <description>&lt;P&gt;one simple way to address this is by script, build a bridge for your week that implements the logic for accumulation, week2 is associated to your fact weeks 1 and 2, Week 3 to 1,2,and 3.&lt;/P&gt;&lt;P&gt;so when you sum by the new Week field, each is already accumulated.&amp;nbsp; so in your expression you just use&lt;BR /&gt;sum({&amp;lt;Week={"&amp;gt;=4"}&amp;gt;}Qty)&lt;/P&gt;&lt;P&gt;see attached&lt;/P&gt;</description>
      <pubDate>Wed, 16 Dec 2020 13:53:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-filter-cumulative-values-in-pivot-table/m-p/1768991#M718457</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-16T13:53:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter cumulative values in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-filter-cumulative-values-in-pivot-table/m-p/1769137#M718458</link>
      <description>&lt;P&gt;I have simplified the actual problem. The actual operation will involve other data. If I use a script to add a new week field, it is difficult to calculate with other data. I am not familiar with writing script calculations and cannot use it freely. Anyway, this is a new idea.Thank you!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2020 06:25:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-filter-cumulative-values-in-pivot-table/m-p/1769137#M718458</guid>
      <dc:creator>Nora104</dc:creator>
      <dc:date>2020-12-17T06:25:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter cumulative values in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-filter-cumulative-values-in-pivot-table/m-p/1769190#M718459</link>
      <description>&lt;P&gt;It seems that I have tried it successfully, so happy!&lt;/P&gt;&lt;P&gt;I use the formula:&lt;/P&gt;&lt;P&gt;if(Week&amp;gt;=4 and MIN(total&amp;lt;Code&amp;gt;{&amp;lt;Week={"&amp;gt;=4"}&amp;gt;} AGGR(sum(aggr(rangesum(above(Sum(Qty),0,rowNo())),Code,Week)),Code,Week))&amp;lt;150,&lt;BR /&gt;sum(aggr(rangesum(above(Sum(Qty),0,rowNo())),Code,Week)),0)&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2020 09:59:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-filter-cumulative-values-in-pivot-table/m-p/1769190#M718459</guid>
      <dc:creator>Nora104</dc:creator>
      <dc:date>2020-12-17T09:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter cumulative values in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-filter-cumulative-values-in-pivot-table/m-p/1769228#M718460</link>
      <description>&lt;P&gt;what i was suggesting was to move the logic of your expression to the script.&amp;nbsp; use of IF and AGGR in a chart will be very slow and that will show once your data grows.&amp;nbsp; what i am saying becomes obvious when you look at the expressions side by side:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;sum({&amp;lt;Week={"&amp;gt;=4"}&amp;gt;}Qty)&lt;BR /&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if(Week&amp;gt;=4 and MIN(total&amp;lt;Code&amp;gt;{&amp;lt;Week={"&amp;gt;=4"}&amp;gt;} AGGR(sum(aggr(rangesum(above(Sum(Qty),0,rowNo())),Code,Week)),Code,Week))&amp;lt;150,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;sum(aggr(rangesum(above(Sum(Qty),0,rowNo())),Code,Week)),0)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;having said that im glad you got something out of what i suggested.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Dec 2020 11:51:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-filter-cumulative-values-in-pivot-table/m-p/1769228#M718460</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2020-12-17T11:51:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to filter cumulative values in pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-filter-cumulative-values-in-pivot-table/m-p/1769371#M718462</link>
      <description>&lt;P&gt;I found that using this formula can calculate the cumulative value in the dimension：&lt;/P&gt;&lt;P&gt;MIN(total&amp;lt;Code&amp;gt;{&amp;lt;Week={"&amp;gt;=4"}&amp;gt;} aggr(rangesum(above(sum(Qty),0,rowNo())),Code,Week))&lt;/P&gt;&lt;P&gt;It solved my problem.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Dec 2020 02:29:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-filter-cumulative-values-in-pivot-table/m-p/1769371#M718462</guid>
      <dc:creator>Nora104</dc:creator>
      <dc:date>2020-12-18T02:29:55Z</dc:date>
    </item>
  </channel>
</rss>

