<?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 Finding Date when reaches target in straight table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Finding-Date-when-reaches-target-in-straight-table/m-p/283777#M496092</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;I have to check a couple of things but maybe this could be good alternative.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Jan 2012 19:39:10 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-01-17T19:39:10Z</dc:date>
    <item>
      <title>Finding Date when reaches target in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-Date-when-reaches-target-in-straight-table/m-p/283773#M496088</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I have 2 tables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Lets say table1 is:&lt;/P&gt;&lt;P&gt; TargetUnits&lt;/P&gt;&lt;P&gt;TargetDate&lt;/P&gt;&lt;P&gt;Product&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Table2 is:&lt;/P&gt;&lt;P&gt;Date&lt;/P&gt;&lt;P&gt;Units&lt;/P&gt;&lt;P&gt;Product&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I need to show&lt;/P&gt;&lt;P&gt;Product&lt;/P&gt;&lt;P&gt;TargetDate&lt;/P&gt;&lt;P&gt;TargetUnits&lt;/P&gt;&lt;P&gt;Date reaching target&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I cant find the way to acumulate sum until reaching the target by product and obtain the corresponding date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 18:46:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-Date-when-reaches-target-in-straight-table/m-p/283773#M496088</guid>
      <dc:creator />
      <dc:date>2012-01-17T18:46:10Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Date when reaches target in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-Date-when-reaches-target-in-straight-table/m-p/283774#M496089</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should able to do something like the following formula to calculate the average number of units sold per day and divide that by the target units to get the number of days needed to reach the target units.&amp;nbsp; You would then add that number of days to starting date.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;min(Date) + sum(TargetUnits) / (sum(Units)/(max(Date)-min(Date)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Karl&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit:&amp;nbsp; Oops, I thought the column was the date when the target is to be reached and not the date the target was reached.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 19:03:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-Date-when-reaches-target-in-straight-table/m-p/283774#M496089</guid>
      <dc:creator>pover</dc:creator>
      <dc:date>2012-01-17T19:03:28Z</dc:date>
    </item>
    <item>
      <title>Finding Date when reaches target in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-Date-when-reaches-target-in-straight-table/m-p/283775#M496090</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think the problem there is that the date may not be accurate because the transactions aren't linear. &lt;/P&gt;&lt;P&gt;Day 1 can move 30 units and day 2 500 for instance. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 19:09:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-Date-when-reaches-target-in-straight-table/m-p/283775#M496090</guid>
      <dc:creator />
      <dc:date>2012-01-17T19:09:12Z</dc:date>
    </item>
    <item>
      <title>Re: Finding Date when reaches target in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-Date-when-reaches-target-in-straight-table/m-p/283776#M496091</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe like attached?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This uses an accumulation in the script and a flag to indicate when the threshold is reached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think it could get quite hard to do this in the front end only. It looks like a enforced version of a pareto chart (how many days needed to get a threshold (per product) vs. how may customers make up some share of revenue). So I was hoping to get some support by the new dimension limits in QV11, but have not succeeded yet.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;P.S. If you can't open my attachment:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Script to create sample data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Target:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;TargetUnits, TargetDate, Product&lt;/P&gt;&lt;P&gt;100, 17.01.2012, P1&lt;/P&gt;&lt;P&gt;120, 18.01.2012, P2&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Temp_Products:&lt;/P&gt;&lt;P&gt;LOAD Date(MakeDate(2012)+recno()-1) as Date,&lt;/P&gt;&lt;P&gt;'P'&amp;amp;ceil(RAND()*2) as Product,&lt;/P&gt;&lt;P&gt;ceil(RAND()*30) as Units&lt;/P&gt;&lt;P&gt;AutoGenerate 30;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Products:&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;if(AccUnits &amp;gt;= Lookup('TargetUnits','Product',Product,'Target'), 1,0) as Flag;&lt;/P&gt;&lt;P&gt;LOAD * &lt;/P&gt;&lt;P&gt;, if(Peek(Product)=Product,rangesum(Peek(AccUnits),Units), Units) as AccUnits&lt;/P&gt;&lt;P&gt;resident Temp_Products order by Product, Date;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;drop table Temp_Products;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then Expression in chart with dimensions Product:&lt;/P&gt;&lt;P&gt;=FirstSortedValue({&amp;lt;Flag={1}&amp;gt;} AccUnits, Date)&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;=min({&amp;lt;Flag = {1}&amp;gt;} Date&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 19:26:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-Date-when-reaches-target-in-straight-table/m-p/283776#M496091</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-01-17T19:26:35Z</dc:date>
    </item>
    <item>
      <title>Finding Date when reaches target in straight table</title>
      <link>https://community.qlik.com/t5/QlikView/Finding-Date-when-reaches-target-in-straight-table/m-p/283777#M496092</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;I have to check a couple of things but maybe this could be good alternative.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jan 2012 19:39:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Finding-Date-when-reaches-target-in-straight-table/m-p/283777#M496092</guid>
      <dc:creator />
      <dc:date>2012-01-17T19:39:10Z</dc:date>
    </item>
  </channel>
</rss>

