<?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: Formula problem in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Formula-problem/m-p/494106#M184839</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try posting a qvw with sample data to help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 14 Aug 2013 13:18:44 GMT</pubDate>
    <dc:creator>jolivares</dc:creator>
    <dc:date>2013-08-14T13:18:44Z</dc:date>
    <item>
      <title>Formula problem</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-problem/m-p/494105#M184838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good day,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two tables from where I extract info from - Agreements Table and NL trans Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My month and year fields are specified as follow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;DueDate&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; as [Instalment Date],&lt;/P&gt;&lt;P&gt;month(DueDate)&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; as Month,&lt;/P&gt;&lt;P&gt;year(DueDate)&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; as Year,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Due Date in the data is always on the first data of the month.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NL Trans date have various posting dates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My income that I want to calculate comes from the Agreements table, and my Cost comes from my NL trans Table.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used the following formula to calculate my costs: &lt;EM&gt;I have a variable = vMaxDate = max([Instalment Date])&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum(if(monthend([Instalment Date])=vMaxDate,if(left(Narrative,16) &amp;lt;&amp;gt; 'FK Mnthly-MAINT-',(ExpenseCode))))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Maintenance Costs lies in expense code 600 ( I specified in my script that it should only pull data where ExpenseCode = '600')&lt;/P&gt;&lt;P&gt;The NL Trans have various Narratives, I only want it to look at 'FK Mnthly-MAINT- when calculating the costs. But the narrative 'FK Mnthly-MAINT-'has a number afterwards for example 'FK Mnthly-MAINT-13, but I only want it to look at 'FK Mnthly-MAINT-.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But it returns no data, please advice what is wrong with regards to my formula.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;*R*&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Aug 2013 13:07:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-problem/m-p/494105#M184838</guid>
      <dc:creator />
      <dc:date>2013-08-14T13:07:20Z</dc:date>
    </item>
    <item>
      <title>Re: Formula problem</title>
      <link>https://community.qlik.com/t5/QlikView/Formula-problem/m-p/494106#M184839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try posting a qvw with sample data to help you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Aug 2013 13:18:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Formula-problem/m-p/494106#M184839</guid>
      <dc:creator>jolivares</dc:creator>
      <dc:date>2013-08-14T13:18:44Z</dc:date>
    </item>
  </channel>
</rss>

