<?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 How to Calculate MTD Based on 2 fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-Calculate-MTD-Based-on-2-fields/m-p/991030#M337686</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table. In this table we are maintaining a time-sheet records.Based on this Excel sheet we need to develop 3 fields for each Month.&lt;/P&gt;&lt;P&gt;Suppose we are calculating these three fields for Sept.&lt;/P&gt;&lt;P&gt;1: Total Expected Occurances: In First row we will check from 06/September-12/September to 27/September-03/October.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Here we are getting 4 three times and 0 one time.So result will 3+1=4. If we will get any number then it will count 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If it will get NA then count=0.In second row it is getting NA.So count will 0.&lt;/P&gt;&lt;P&gt;2:In Case of field Occurances &amp;gt;= 4 logic is that if it will get any value more than or equals 4 it will return result 1 otherwise 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp; It is counting how much time 4 or more than 4 is present in that row of that month.&lt;/P&gt;&lt;P&gt;&amp;nbsp; For Ist row it is getting 4 four times but second time no value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3:MTD for Month=Occurances &amp;gt;= 4&amp;nbsp; /&amp;nbsp; Total Expected Occurances&lt;/P&gt;&lt;P&gt;Using same logic we need to develop all the Months MTD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please suggest this logic how to implement in Qlikview script.I need to prepare a MTD Chart for All the GBU for each Month.&lt;/P&gt;&lt;P&gt;Is it possible to handel in bach-end script.I am able to Calculate 2 fields on front end but MTD values are not coming correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waiting for ur response.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 03 Oct 2015 05:02:42 GMT</pubDate>
    <dc:creator>rishikeshtiwari</dc:creator>
    <dc:date>2015-10-03T05:02:42Z</dc:date>
    <item>
      <title>How to Calculate MTD Based on 2 fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-Calculate-MTD-Based-on-2-fields/m-p/991030#M337686</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Guys,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table. In this table we are maintaining a time-sheet records.Based on this Excel sheet we need to develop 3 fields for each Month.&lt;/P&gt;&lt;P&gt;Suppose we are calculating these three fields for Sept.&lt;/P&gt;&lt;P&gt;1: Total Expected Occurances: In First row we will check from 06/September-12/September to 27/September-03/October.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Here we are getting 4 three times and 0 one time.So result will 3+1=4. If we will get any number then it will count 1.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If it will get NA then count=0.In second row it is getting NA.So count will 0.&lt;/P&gt;&lt;P&gt;2:In Case of field Occurances &amp;gt;= 4 logic is that if it will get any value more than or equals 4 it will return result 1 otherwise 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp; It is counting how much time 4 or more than 4 is present in that row of that month.&lt;/P&gt;&lt;P&gt;&amp;nbsp; For Ist row it is getting 4 four times but second time no value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3:MTD for Month=Occurances &amp;gt;= 4&amp;nbsp; /&amp;nbsp; Total Expected Occurances&lt;/P&gt;&lt;P&gt;Using same logic we need to develop all the Months MTD.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you please suggest this logic how to implement in Qlikview script.I need to prepare a MTD Chart for All the GBU for each Month.&lt;/P&gt;&lt;P&gt;Is it possible to handel in bach-end script.I am able to Calculate 2 fields on front end but MTD values are not coming correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Waiting for ur response.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Oct 2015 05:02:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-Calculate-MTD-Based-on-2-fields/m-p/991030#M337686</guid>
      <dc:creator>rishikeshtiwari</dc:creator>
      <dc:date>2015-10-03T05:02:42Z</dc:date>
    </item>
  </channel>
</rss>

