<?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 Visualization of a cumulative table with date filters in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Visualization-of-a-cumulative-table-with-date-filters/m-p/1827437#M68097</link>
    <description>&lt;P&gt;Hello world,&lt;/P&gt;&lt;P&gt;So I'm having some trouble with a visualization of a cumulative table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Background: Imagine a table that controls the stock of a product. It doesn't UPDATE its quantity directly, instead the entire history of the stock of the item is stored (eg. +3 items yesterday and -2 today, now I have 1 item).&lt;/P&gt;&lt;P&gt;When I visualize this table with date filters it doesn't compute the actual quantity of the stock, it calculates the variation of the product during the date I filtered:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="1.jpg" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59863i614617A0AAA5EB50/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there any way to sum the quantity of the product up to the date I filtered on Qlik? So if I filtered for 2019, 2020 and 2021, it works out the stock from the first date ever (eg. 2010) up to 2021 and then use that value as a reference for the graph calculation. It would result on something like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.jpg" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59864iF40FDDF53CE62BF5/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.jpg" alt="2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm capable of doing it by creating a table that stores the actual amount of every item yearly and then concatenating with the stock table using a clump of if-statements so it's pretty inefficient. And in that case I wouldn't be capable of changing the filter date as well/I would be obliged to only use yearly filters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The functions that I'm using for the first graph are:&lt;/P&gt;&lt;P&gt;Dimension:&amp;nbsp;Dual(Year([Datejoin])&amp;amp;'-'&amp;amp;Month([Datejoin]),MonthStart([Datejoin]))&lt;/P&gt;&lt;P&gt;Measure: RangeSum( above(total sum( {$&amp;lt;Type={'Standard'}, IsPurchaseItem={'1'}, IsSalesItem={'1'}&amp;gt;} [Stock.StockPosition.Amount]),0,RowNo(total)))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Tue, 30 Nov 2021 18:17:33 GMT</pubDate>
    <dc:creator>DanielPeixoto</dc:creator>
    <dc:date>2021-11-30T18:17:33Z</dc:date>
    <item>
      <title>Visualization of a cumulative table with date filters</title>
      <link>https://community.qlik.com/t5/App-Development/Visualization-of-a-cumulative-table-with-date-filters/m-p/1827437#M68097</link>
      <description>&lt;P&gt;Hello world,&lt;/P&gt;&lt;P&gt;So I'm having some trouble with a visualization of a cumulative table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Background: Imagine a table that controls the stock of a product. It doesn't UPDATE its quantity directly, instead the entire history of the stock of the item is stored (eg. +3 items yesterday and -2 today, now I have 1 item).&lt;/P&gt;&lt;P&gt;When I visualize this table with date filters it doesn't compute the actual quantity of the stock, it calculates the variation of the product during the date I filtered:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="1.jpg" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59863i614617A0AAA5EB50/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.jpg" alt="1.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Is there any way to sum the quantity of the product up to the date I filtered on Qlik? So if I filtered for 2019, 2020 and 2021, it works out the stock from the first date ever (eg. 2010) up to 2021 and then use that value as a reference for the graph calculation. It would result on something like this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2.jpg" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/59864iF40FDDF53CE62BF5/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.jpg" alt="2.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I'm capable of doing it by creating a table that stores the actual amount of every item yearly and then concatenating with the stock table using a clump of if-statements so it's pretty inefficient. And in that case I wouldn't be capable of changing the filter date as well/I would be obliged to only use yearly filters.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The functions that I'm using for the first graph are:&lt;/P&gt;&lt;P&gt;Dimension:&amp;nbsp;Dual(Year([Datejoin])&amp;amp;'-'&amp;amp;Month([Datejoin]),MonthStart([Datejoin]))&lt;/P&gt;&lt;P&gt;Measure: RangeSum( above(total sum( {$&amp;lt;Type={'Standard'}, IsPurchaseItem={'1'}, IsSalesItem={'1'}&amp;gt;} [Stock.StockPosition.Amount]),0,RowNo(total)))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 30 Nov 2021 18:17:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Visualization-of-a-cumulative-table-with-date-filters/m-p/1827437#M68097</guid>
      <dc:creator>DanielPeixoto</dc:creator>
      <dc:date>2021-11-30T18:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Visualization of a cumulative table with date filters</title>
      <link>https://community.qlik.com/t5/App-Development/Visualization-of-a-cumulative-table-with-date-filters/m-p/1827701#M68142</link>
      <description>&lt;P&gt;Bump. Does anyone know?&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried working this out in the Data Load Editor but I can't interact with the filter as a variable there.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I decided to experiment on a KPI just for debugging purposes but the result should be the same. On the expression this is what I'm kinda working with (2010 is the starting point where I should start looking):&lt;/P&gt;&lt;P&gt;sum({$&amp;lt;Type={'Standard'}, IsPurchaseItem={'1'}, IsSalesItem={'1'},&lt;STRONG&gt; [Datejoin.autoCalendar.Year] = {$(=Date(AddYears(Min([Datejoin.autoCalendar.Year]), 2010-Min([Datejoin.autoCalendar.Year])),'YYYY'))}&amp;nbsp;&lt;/STRONG&gt;&amp;gt;} [Stock.StockPosition.Amount])&lt;/P&gt;&lt;P&gt;I can try to explain it better if needed.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Aug 2021 11:23:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Visualization-of-a-cumulative-table-with-date-filters/m-p/1827701#M68142</guid>
      <dc:creator>DanielPeixoto</dc:creator>
      <dc:date>2021-08-10T11:23:11Z</dc:date>
    </item>
  </channel>
</rss>

