<?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 solve this logic in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/how-to-solve-this-logic/m-p/1033430#M348678</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this but is not working for me&lt;/P&gt;&lt;P&gt;Variable vStartDate=Max(SalesDate) then write expression in chart with Product as Dimension&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Sum(If(SalesDate&amp;gt;Date(vStartDate) and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SalesDate&lt;/SPAN&gt;&amp;lt;=Date(vStartDate+LeadTime), Sales))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Mar 2016 06:54:51 GMT</pubDate>
    <dc:creator>amayuresh</dc:creator>
    <dc:date>2016-03-09T06:54:51Z</dc:date>
    <item>
      <title>how to solve this logic</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-solve-this-logic/m-p/1033428#M348676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two tables, table 1 contains multiple products with sales and sales date, Table 2 has product and lead time for each product.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now I want to create a table: where I want to start a start date from calendar object and&amp;nbsp; the sales should be calculated as from StartDate to StartDate+LeadTime.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose for Product A the leadtime is 10 and for Product B the lead time is 6&lt;/P&gt;&lt;P&gt;and If I enter the startdate as 1/20/2016 so the sales for product A should be from 1/21/2016 to 1/30/2016 and for product B from 1/21/2016 to 1/26/2016.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have attached the sample qlikview file and xl data file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Below is the expected output for the attached data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); border-image: none; width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Product&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Sales&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Product A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;100&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Product B&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;60&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for you help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2016 04:26:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-solve-this-logic/m-p/1033428#M348676</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-09T04:26:29Z</dc:date>
    </item>
    <item>
      <title>Re: how to solve this logic</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-solve-this-logic/m-p/1033429#M348677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this case, set analysis would not be ideal. Try like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(If(Date&amp;gt;Date(vStartDate) and Date&amp;lt;=Date(vStartDate+LeadTime), Sales))&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Untitled.png" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/117453_Untitled.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2016 04:42:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-solve-this-logic/m-p/1033429#M348677</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2016-03-09T04:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: how to solve this logic</title>
      <link>https://community.qlik.com/t5/QlikView/how-to-solve-this-logic/m-p/1033430#M348678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried this but is not working for me&lt;/P&gt;&lt;P&gt;Variable vStartDate=Max(SalesDate) then write expression in chart with Product as Dimension&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;=Sum(If(SalesDate&amp;gt;Date(vStartDate) and &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;SalesDate&lt;/SPAN&gt;&amp;lt;=Date(vStartDate+LeadTime), Sales))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2016 06:54:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/how-to-solve-this-logic/m-p/1033430#M348678</guid>
      <dc:creator>amayuresh</dc:creator>
      <dc:date>2016-03-09T06:54:51Z</dc:date>
    </item>
  </channel>
</rss>

