<?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: Variables, Scenario Analysis, and Expressions? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Variables-Scenario-Analysis-and-Expressions/m-p/1027612#M347181</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Amazing! Thank you so much. Why could I not do that on my own??? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 31 Mar 2016 15:00:59 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-03-31T15:00:59Z</dc:date>
    <item>
      <title>Variables, Scenario Analysis, and Expressions?</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-Scenario-Analysis-and-Expressions/m-p/1027610#M347179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working to do some scenario analysis and can't figure out how to do what I need!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imagine the following simple data set:&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;DocumentNum&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;Date 1&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;Date 2&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;Amount&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;1&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3-10-16&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3-15-16&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;2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3-15-16&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3-18-16&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;150&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2-15-16&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2-10-16&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;200&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;4&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2-25-16&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2-20-16&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;125&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;5&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1-25-16&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2-20-16&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;50&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;I want a result returned to me that adds up all of the amounts where Date 1 is less than or equal to Date 2 for whatever my selection is. So, I have been using:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({1&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[DocumentNum]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"=([Date 1]&amp;lt;=[Date 2])"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Amount&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This seems to work just fine- in the data set above, this gives a total of 300 from items1,2,5.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But now, I want to allow the user the ability to enter in a number of days to add on to Date 1, and then calculate a new total. I set up an input box with a variable: v_days.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I want my formula now to do add up all of the amounts where (Date 1 + v_days) is less than or equal to Date 2. If I entered 4 as v_days, this should give me a total of 150 (from items1,5). If I entered 10 as v_days, this should give me a total of 50 (just item 5 now works).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But I can't seem to get this formula right- help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2016 14:38:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-Scenario-Analysis-and-Expressions/m-p/1027610#M347179</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-31T14:38:54Z</dc:date>
    </item>
    <item>
      <title>Re: Variables, Scenario Analysis, and Expressions?</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-Scenario-Analysis-and-Expressions/m-p/1027611#M347180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems to be working:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Sum({1&amp;lt;[DocumentNum]={"=(([Date 1] + $(v_Days))&amp;lt;=[Date 2])"}&amp;gt;}Amount)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2016 14:55:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-Scenario-Analysis-and-Expressions/m-p/1027611#M347180</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-31T14:55:12Z</dc:date>
    </item>
    <item>
      <title>Re: Variables, Scenario Analysis, and Expressions?</title>
      <link>https://community.qlik.com/t5/QlikView/Variables-Scenario-Analysis-and-Expressions/m-p/1027612#M347181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Amazing! Thank you so much. Why could I not do that on my own??? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Mar 2016 15:00:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Variables-Scenario-Analysis-and-Expressions/m-p/1027612#M347181</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-03-31T15:00:59Z</dc:date>
    </item>
  </channel>
</rss>

