<?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: Calculating Amount between two time periods Syntax help in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculating-Amount-between-two-time-periods-Syntax-help/m-p/483264#M1141277</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jpapador,&lt;/P&gt;&lt;P&gt;Thanks for your response. the trouble with that expression is that it compares month with a year and month combination and returns everything under the sun.&lt;/P&gt;&lt;P&gt;I tried something like that myself before posting the question as given below&lt;/P&gt;&lt;P&gt;sum(&lt;/P&gt;&lt;P&gt;if(Month&amp;gt;= (Month($(vVersionMonthEnd)) +1) AND Month(YearMonth)&amp;lt;=Month(ContractEndDate) ,Amount))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where vVersionMonthEnd returns the version closed date like 2013/08/31, column Month returns Jan Feb Mar...&lt;/P&gt;&lt;P&gt;The trouble with that expression is that when I put it in a straight chart to view values by month, values for months Jan- Aug for each year is stripped off, when I want those months to be stripped off only for the current year.&lt;/P&gt;&lt;P&gt;the trick here is successfully comparing year and month from the YearMonth&amp;nbsp;&amp;nbsp; column which has values like 2013-01, 2013-02 and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is the expression help I am looking for. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Sep 2013 17:37:48 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-09-05T17:37:48Z</dc:date>
    <item>
      <title>Calculating Amount between two time periods Syntax help</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-Amount-between-two-time-periods-Syntax-help/m-p/483262#M1141275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have a pivot chart with Product, Contract Number and Contract End Date listed on the Y Axis (rows) and months (Jan 2013, Feb 2013 ... Dec 2014) on the X Axis (Columns). Contracted amount by month (sum(Amount)) is the expression.&lt;/P&gt;&lt;P&gt;So the chart looks like as shown below&lt;/P&gt;&lt;P&gt;Product&amp;nbsp;&amp;nbsp; ContractNo. ContractEndDate YearMonth Jan 2013 Feb 2013 Mar 2013 .....Dec 2014&lt;/P&gt;&lt;P&gt;Prod A&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 000001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 10/31/2015&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $200&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $50&amp;nbsp; .....&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $133&lt;/P&gt;&lt;P&gt;Prod B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 000005&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 4/30/2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $50&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $75&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $60&amp;nbsp; .....&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $20&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If we assume the Closed Month = August 2013, I want to create a calculation (Total Remaining Amount) (a column next to Contract End Date)&amp;nbsp; that sums up all amounts From Sep 2013 upto 10/31/2015 for Prod A and&amp;nbsp; upto 4/30/2014 for Prod B &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The calculation that I need help with the syntax in words is &lt;/P&gt;&lt;P&gt;Sum All Amounts between Sep 2013 (i.e. ClosedMonth +1) and Contract End Date&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help will be greatly appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Amitesh&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 19:29:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-Amount-between-two-time-periods-Syntax-help/m-p/483262#M1141275</guid>
      <dc:creator />
      <dc:date>2013-09-04T19:29:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Amount between two time periods Syntax help</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-Amount-between-two-time-periods-Syntax-help/m-p/483263#M1141276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this as your expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(If(YearMonth &amp;gt;= Month(Today()) and YearMonth &amp;lt;= (Month(ContractEndDate)+1), Amount))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Sep 2013 20:56:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-Amount-between-two-time-periods-Syntax-help/m-p/483263#M1141276</guid>
      <dc:creator>jpapador</dc:creator>
      <dc:date>2013-09-04T20:56:22Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating Amount between two time periods Syntax help</title>
      <link>https://community.qlik.com/t5/QlikView/Calculating-Amount-between-two-time-periods-Syntax-help/m-p/483264#M1141277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jpapador,&lt;/P&gt;&lt;P&gt;Thanks for your response. the trouble with that expression is that it compares month with a year and month combination and returns everything under the sun.&lt;/P&gt;&lt;P&gt;I tried something like that myself before posting the question as given below&lt;/P&gt;&lt;P&gt;sum(&lt;/P&gt;&lt;P&gt;if(Month&amp;gt;= (Month($(vVersionMonthEnd)) +1) AND Month(YearMonth)&amp;lt;=Month(ContractEndDate) ,Amount))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where vVersionMonthEnd returns the version closed date like 2013/08/31, column Month returns Jan Feb Mar...&lt;/P&gt;&lt;P&gt;The trouble with that expression is that when I put it in a straight chart to view values by month, values for months Jan- Aug for each year is stripped off, when I want those months to be stripped off only for the current year.&lt;/P&gt;&lt;P&gt;the trick here is successfully comparing year and month from the YearMonth&amp;nbsp;&amp;nbsp; column which has values like 2013-01, 2013-02 and so on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That is the expression help I am looking for. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Sep 2013 17:37:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculating-Amount-between-two-time-periods-Syntax-help/m-p/483264#M1141277</guid>
      <dc:creator />
      <dc:date>2013-09-05T17:37:48Z</dc:date>
    </item>
  </channel>
</rss>

