<?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 Derive a Value Based on two dates and a Value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Derive-a-Value-Based-on-two-dates-and-a-Value/m-p/1100036#M365077</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have an requirement. I have a table having Some fields.Two fields are of Date fields Date1 &amp;amp; Date2. In respect of Date1 field there is a Value1 field. We need to derive the Value2 with respect to date2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Value2 is depend on 3 fields Customer, Date1 and Value1. &lt;/P&gt;&lt;P&gt;Example in Excel Sheet::&lt;/P&gt;&lt;P&gt;For C1 ,Date1 is 01/01/2016 and Value is 100.Therefore for Date2 we need to derive the value2.&lt;/P&gt;&lt;P&gt;Logic is that if for Same Customer Date1 &amp;lt;=Date2 then Value1 will be the value2.&lt;/P&gt;&lt;P&gt;For Column 1 Value of Value2 will be 100 because Date1=Date2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other case Column2 ::Date1 &amp;gt; Date2 ,In this case we will see the upper value of Date1 if this Date &amp;lt;= Date2 then Value of Value1 for that will&amp;nbsp; be the Value of Value2.&lt;/P&gt;&lt;P&gt;For Column2 Value2 will be 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same for column3 Value2 will be 100 because Date1&amp;gt; date2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So we are always assuming the value of value2 ,according to date2 where Date1&amp;lt;=Date2.&lt;/P&gt;&lt;P&gt;If not then we assuming previous value. If the previous Date is also large then we will check upper of the previous value.&lt;/P&gt;&lt;P&gt;That is our overall logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rishi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jun 2016 12:33:14 GMT</pubDate>
    <dc:creator>rishikeshtiwari</dc:creator>
    <dc:date>2016-06-23T12:33:14Z</dc:date>
    <item>
      <title>Derive a Value Based on two dates and a Value</title>
      <link>https://community.qlik.com/t5/QlikView/Derive-a-Value-Based-on-two-dates-and-a-Value/m-p/1100036#M365077</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have an requirement. I have a table having Some fields.Two fields are of Date fields Date1 &amp;amp; Date2. In respect of Date1 field there is a Value1 field. We need to derive the Value2 with respect to date2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Value2 is depend on 3 fields Customer, Date1 and Value1. &lt;/P&gt;&lt;P&gt;Example in Excel Sheet::&lt;/P&gt;&lt;P&gt;For C1 ,Date1 is 01/01/2016 and Value is 100.Therefore for Date2 we need to derive the value2.&lt;/P&gt;&lt;P&gt;Logic is that if for Same Customer Date1 &amp;lt;=Date2 then Value1 will be the value2.&lt;/P&gt;&lt;P&gt;For Column 1 Value of Value2 will be 100 because Date1=Date2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Other case Column2 ::Date1 &amp;gt; Date2 ,In this case we will see the upper value of Date1 if this Date &amp;lt;= Date2 then Value of Value1 for that will&amp;nbsp; be the Value of Value2.&lt;/P&gt;&lt;P&gt;For Column2 Value2 will be 100.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Same for column3 Value2 will be 100 because Date1&amp;gt; date2.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So we are always assuming the value of value2 ,according to date2 where Date1&amp;lt;=Date2.&lt;/P&gt;&lt;P&gt;If not then we assuming previous value. If the previous Date is also large then we will check upper of the previous value.&lt;/P&gt;&lt;P&gt;That is our overall logic.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Rishi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jun 2016 12:33:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Derive-a-Value-Based-on-two-dates-and-a-Value/m-p/1100036#M365077</guid>
      <dc:creator>rishikeshtiwari</dc:creator>
      <dc:date>2016-06-23T12:33:14Z</dc:date>
    </item>
    <item>
      <title>Re: Derive a Value Based on two dates and a Value</title>
      <link>https://community.qlik.com/t5/QlikView/Derive-a-Value-Based-on-two-dates-and-a-Value/m-p/1100037#M365078</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see you marked this as 'Assumed Answer', have you resolved your issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jun 2016 19:35:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Derive-a-Value-Based-on-two-dates-and-a-Value/m-p/1100037#M365078</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-06-24T19:35:55Z</dc:date>
    </item>
  </channel>
</rss>

