<?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 calculating in script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/calculating-in-script/m-p/1014817#M637567</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 such DATA in my SOURCE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARTNER NAME,&lt;/P&gt;&lt;P&gt;PERIOD (QTR),&lt;/P&gt;&lt;P&gt;REVENUES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REVENUES are cumulated in the year (Q1 is revenue for Q1, Q2 is revenue for Q1 and Q2 ad so on) &lt;/P&gt;&lt;P&gt;I need to calcuate REVENUES_QARTARLY for every single quarter - on script level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So generaly:&lt;/P&gt;&lt;P&gt;if (Q1, REVENUES, REVENUES - PREVIOUS REVENUES)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The trap I identified:&lt;/P&gt;&lt;P&gt;1. When Partner appears first time in data:&lt;/P&gt;&lt;P&gt;&amp;nbsp; a) if he appeard in Q1 it is easy no calculations are necessery&lt;/P&gt;&lt;P&gt;&amp;nbsp; b) if he appeard in Q2 I need the average (REVENUES/QTR_NO)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. When there is a drop in data&lt;/P&gt;&lt;P&gt;&amp;nbsp; a) for period with the lack I don't want to see any REVENUES_QARTARLY&lt;/P&gt;&lt;P&gt;&amp;nbsp; b) for period after the lack I need the average (REVENUES/QTR_NO)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anny suggestions?,&lt;/P&gt;&lt;P&gt;L&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Mar 2016 10:50:08 GMT</pubDate>
    <dc:creator>arsenal1983</dc:creator>
    <dc:date>2016-03-17T10:50:08Z</dc:date>
    <item>
      <title>calculating in script</title>
      <link>https://community.qlik.com/t5/QlikView/calculating-in-script/m-p/1014817#M637567</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 such DATA in my SOURCE:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PARTNER NAME,&lt;/P&gt;&lt;P&gt;PERIOD (QTR),&lt;/P&gt;&lt;P&gt;REVENUES&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;REVENUES are cumulated in the year (Q1 is revenue for Q1, Q2 is revenue for Q1 and Q2 ad so on) &lt;/P&gt;&lt;P&gt;I need to calcuate REVENUES_QARTARLY for every single quarter - on script level.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So generaly:&lt;/P&gt;&lt;P&gt;if (Q1, REVENUES, REVENUES - PREVIOUS REVENUES)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The trap I identified:&lt;/P&gt;&lt;P&gt;1. When Partner appears first time in data:&lt;/P&gt;&lt;P&gt;&amp;nbsp; a) if he appeard in Q1 it is easy no calculations are necessery&lt;/P&gt;&lt;P&gt;&amp;nbsp; b) if he appeard in Q2 I need the average (REVENUES/QTR_NO)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. When there is a drop in data&lt;/P&gt;&lt;P&gt;&amp;nbsp; a) for period with the lack I don't want to see any REVENUES_QARTARLY&lt;/P&gt;&lt;P&gt;&amp;nbsp; b) for period after the lack I need the average (REVENUES/QTR_NO)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Anny suggestions?,&lt;/P&gt;&lt;P&gt;L&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Mar 2016 10:50:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculating-in-script/m-p/1014817#M637567</guid>
      <dc:creator>arsenal1983</dc:creator>
      <dc:date>2016-03-17T10:50:08Z</dc:date>
    </item>
  </channel>
</rss>

