<?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: Using XNPV function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141896#M901735</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We might be able to create an Aggr function here, i just created the flag for simplicity. I don't have access to my computer right now, but will try to get back to you as soon as i get home.&lt;/SPAN&gt;&lt;P class=""&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;Best,&lt;/P&gt;&lt;P class=""&gt;Sunny&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Jul 2016 21:29:12 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-07-12T21:29:12Z</dc:date>
    <item>
      <title>Using XNPV function</title>
      <link>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141891#M901730</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have got a table with a expression that calculates the GROSS MARGIN, OPERATIONAL PROFIT and would like to calculate the XNPV for it, but unfortunately it is not accepting set analysis as a parameter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, see below the data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLE_1:&lt;/P&gt;&lt;P&gt;LOAD * INLINE [&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ID, Product, GROSS PROFIT, NET REVENUE, Month, DATE, REGION&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, Pineapple, 100, 10, January, 10/01/2017, A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1, Pineapple, 150, 20, January, 15/01/2018, A&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, Apple, 100, 40, January, 20/01/2016, B&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2, Apple, 50, 40, January, 20/01/2017, B&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 3, Melon, 30, 30, January, 25/01/2019, C&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&amp;nbsp;&amp;nbsp; &lt;SPAN style="font-size: 13.3333px;"&gt; 3, Melon, 100, 30, January, 25/01/2019, C&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Calculation:&lt;/P&gt;&lt;P&gt;load *,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '' as [GROSS MARGIN],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '' as [OP. PROFIT],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; '' as NPV&lt;/P&gt;&lt;P&gt;Resident TABLE_1;&lt;/P&gt;&lt;P&gt;drop table TABLE_1;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NoConcatenate&lt;/P&gt;&lt;P&gt;TMP:&lt;/P&gt;&lt;P&gt;load&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ID,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Product,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Month, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; DATE,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; REGION,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [GROSS PROFIT],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [NET REVENUE],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [GROSS MARGIN],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; [OP. PROFIT],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; NPV&lt;/P&gt;&lt;P&gt;Resident Calculation;&lt;/P&gt;&lt;P&gt;drop table Calculation;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FINAL:&lt;/P&gt;&lt;P&gt;CrossTable(TYPE, REVENUE, 5)&lt;/P&gt;&lt;P&gt;load *&lt;/P&gt;&lt;P&gt;Resident TMP;&lt;/P&gt;&lt;P&gt;drop Table TMP;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For calculating the GROSS MARGIN and OP. PROFIT I follow the instructions from this post &lt;A href="https://community.qlik.com/thread/224568" target="_blank"&gt;Calculating percentages in pivot table&lt;/A&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;using the expression as below: &lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;=Pick(Match(TYPE, 'GROSS PROFIT', 'NET REVENUE', 'GROSS MARGIN', 'GeA', 'OP. PROFIT'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Sum(REVENUE),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Sum(REVENUE),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Num(Sum(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'GROSS PROFIT'}&amp;gt;}REVENUE)/Sum(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'NET REVENUE'}&amp;gt;}REVENUE), '##.0%'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;Sum(REVENUE)*0.20,&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;Sum(REVENUE) - &lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;Sum(REVENUE)*0.20,&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;The problem is if I try to add XNPV function inside the expression it does not give me the right result, as seen below. In addition, I would like to display the result for each region separate in column. So for dimension it will have PRODUCT and TYPE.&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;This is only for region A:&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;=Pick(Match(TYPE, 'GROSS PROFIT', 'NET REVENUE', 'GROSS MARGIN', 'GeA', 'OP. PROFIT', 'NPV'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Sum(&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt; {&amp;lt;REGION={'A'}&amp;gt;} &lt;/STRONG&gt;REVENUE),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;Sum(&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt; {&amp;lt;REGION={'A'}&amp;gt;} &lt;/STRONG&gt;REVENUE),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;Num(Sum(TOTAL &lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;&amp;lt;Product&amp;gt;&lt;/STRONG&gt; {&amp;lt;REGION={'A'}, TYPE = {'GROSS PROFIT'}&amp;gt;}REVENUE)/Sum(TOTAL &lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;&amp;lt;Product&amp;gt;&lt;/STRONG&gt; {&amp;lt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;REGION={'A'}, &lt;/STRONG&gt;TYPE = {'NET REVENUE'}&amp;gt;}REVENUE), '##.0%'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;Sum(&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt; {&amp;lt;REGION={'A'}&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;, TYPE = {'GROSS PROFIT'}&lt;/STRONG&gt;&amp;gt;} &lt;/STRONG&gt;REVENUE)&lt;/STRONG&gt;*0.20,&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;Sum(&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt; {&amp;lt;REGION={'A'}&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;, TYPE = {'GROSS PROFIT'}&lt;/STRONG&gt;&amp;gt;} &lt;/STRONG&gt;REVENUE)&lt;/STRONG&gt; - &lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;Sum(&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt; {&amp;lt;REGION={'A'}&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;, TYPE = {'GROSS PROFIT'}&lt;/STRONG&gt;&amp;gt;} &lt;/STRONG&gt;REVENUE)&lt;/STRONG&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;*0.20,&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;xnpv(0.1, (&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;Sum(&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt; {&amp;lt;REGION={'A'}&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;, TYPE = {'GROSS PROFIT'}&lt;/STRONG&gt;&amp;gt;} &lt;/STRONG&gt;REVENUE)&lt;/STRONG&gt; - &lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;Sum(&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt; {&amp;lt;REGION={'A'}&lt;STRONG style="color: #3d3d3d; font-family: inherit; font-size: 13px; font-style: inherit;"&gt;, TYPE = {'GROSS PROFIT'}&lt;/STRONG&gt;&amp;gt;} &lt;/STRONG&gt;REVENUE)&lt;/STRONG&gt;&lt;STRONG style="font-family: inherit; font-style: inherit;"&gt;*0.20&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;), DATE)&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG style="font-style: inherit; font-family: inherit;"&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Desirable result would be like below:&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); 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;PRODUCT&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;TYPE&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;A&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;B&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;P&gt;C&lt;/P&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;Pineapple&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;GROSS PROFIT&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;250&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Pineapple&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;NET REVENUE&lt;/TD&gt;&lt;TD&gt;30&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Pineapple&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;GROSS MARGIN&lt;/TD&gt;&lt;TD&gt;833%&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;Pineapple&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;GeA&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;50&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Pineapple&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;OP. PROFIT&lt;/TD&gt;&lt;TD&gt;200&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Pineapple&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD&gt;NPV&lt;/TD&gt;&lt;TD&gt;188,94(from excel)&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;Apple&lt;/P&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;GROSS PROFIT&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;150&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Apple&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;NET REVENUE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;80&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Apple&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;GROSS MARGIN&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;188%&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Apple&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;GeA&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;30&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Apple&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;OP. PROFIT&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;120&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Apple&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;NPV&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;116,36&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Melon&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;GROSS PROFIT&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;130&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Melon&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;NET REVENUE&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;60&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Melon&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;GROSS MARGIN&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;217%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Melon&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;GeA&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;26&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Melon&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;OP. PROFIT&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;104&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Melon&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;NPV&lt;/SPAN&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;101,81&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;&lt;/P&gt;&lt;P&gt;Any suggestion on XNPV function? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141891#M901730</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using XNPV function</title>
      <link>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141892#M901731</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The closest I could get was this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/131068_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Pick(Match(TYPE, 'GROSS PROFIT', 'NET REVENUE', 'GROSS MARGIN', 'GeA', 'OP. PROFIT', 'NPV'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(REVENUE),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(REVENUE),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Num(Sum(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'GROSS PROFIT'}&amp;gt;}REVENUE)/Sum(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'NET REVENUE'}&amp;gt;}REVENUE), '##.0%'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'GROSS PROFIT'}&amp;gt;} REVENUE)*0.20,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'GROSS PROFIT'}&amp;gt;} REVENUE)*0.80,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Num(XNPV(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;Flag = {1}&amp;gt;}0.10, REVENUE, DATE), '#,##0.00')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2016 20:43:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141892#M901731</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-12T20:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Using XNPV function</title>
      <link>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141893#M901732</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think melon are off because we have same DATE for both records which could be a typo in the sample&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/131072_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2016 20:55:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141893#M901732</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-12T20:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using XNPV function</title>
      <link>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141894#M901733</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The result is what I was looking for, but in my case I have a problem. I cannot flag the 'NEW GROSS PROFIT' field in my code as the value is got by a calculation used in expression. (in the problem case I have put the value straight in table to simplify my question). &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at your answer I would like to know if Is there a way of getting the result of last expression,&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Sum(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'GROSS PROFIT'}&amp;gt;} REVENUE)*0.80 &lt;/STRONG&gt;and then put in on next expression?&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;Num(XNPV(TOTAL &amp;lt;Product&amp;gt; (LAST EXPRESSION) 0.10, REVENUE, DATE), '#,##0.00'). &lt;/STRONG&gt;Just asking in case we have another possibility of doing that. Otherwise I will have to pass the calculation of GROSS PROFIT to load script and solve the problems I was having.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2016 21:24:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141894#M901733</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-12T21:24:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using XNPV function</title>
      <link>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141895#M901734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, that's true. Both XNPV and NPV works if we have more than one date at least. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2016 21:26:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141895#M901734</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-12T21:26:18Z</dc:date>
    </item>
    <item>
      <title>Re: Using XNPV function</title>
      <link>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141896#M901735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;We might be able to create an Aggr function here, i just created the flag for simplicity. I don't have access to my computer right now, but will try to get back to you as soon as i get home.&lt;/SPAN&gt;&lt;P class=""&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P class=""&gt;Best,&lt;/P&gt;&lt;P class=""&gt;Sunny&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2016 21:29:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141896#M901735</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-12T21:29:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using XNPV function</title>
      <link>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141897#M901736</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Sunny.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I appreciate your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Jul 2016 21:46:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141897#M901736</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-12T21:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: Using XNPV function</title>
      <link>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141898#M901737</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Here you go:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Pick(Match(TYPE, 'GROSS PROFIT', 'NET REVENUE', 'GROSS MARGIN', 'GeA', 'OP. PROFIT', 'NPV'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(REVENUE),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(REVENUE),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Num(Sum(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'GROSS PROFIT'}&amp;gt;}REVENUE)/Sum(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'NET REVENUE'}&amp;gt;}REVENUE), '##.0%'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'GROSS PROFIT'}&amp;gt;} REVENUE)*0.20,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'GROSS PROFIT'}&amp;gt;} REVENUE)*0.80,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #575757;"&gt;Num(XNPV(TOTAL &amp;lt;Product&amp;gt; &lt;SPAN style="color: #ff0000;"&gt;{&amp;lt;TYPE = {'GROSS PROFIT'}&amp;gt;}&lt;/SPAN&gt;0.10, &lt;SPAN style="color: #ff0000;"&gt;REVENUE*0.80&lt;/SPAN&gt;, DATE), '#,##0.00')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #575757;"&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 00:02:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141898#M901737</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-13T00:02:14Z</dc:date>
    </item>
    <item>
      <title>Re: Using XNPV function</title>
      <link>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141899#M901738</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny, Thanks for your answer. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am trying to implement it in my code. That's why I haven't gave you a feedback about that yet. In my example is working perfectly, but in code we have different gross profit for each product and it is obtained only in chart. We don't have the value in load script because when I do that I get an error and due to time I prefer to do everything in a chart. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, one last question for that. Is that possible to do a subtraction of values? Lets take the same example and forget that GeA is 20% from GROSS PROFIT. and OP. PROFIT = GROSS PROFIT - GeA.&amp;nbsp; &lt;/P&gt;&lt;P&gt;In this case I am trying to subtract one NPV per another (I don't know if I will get the right result, doing it to test the possibility), but the second part of expression it is not being recognized. Is there a way of doing that?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Num((XNPV(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'GROSS PROFIT'}&amp;gt;}0.10, REVENUE, DATE) - XNPV(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'GeA'}&amp;gt;}0.10, REVENUE*0.2, DATE)), '#,##0.00')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jul 2016 13:09:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141899#M901738</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-14T13:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using XNPV function</title>
      <link>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141900#M901739</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This seems to be working for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;=Pick(Match(TYPE, 'GROSS PROFIT', 'NET REVENUE', 'GROSS MARGIN', 'GeA', 'OP. PROFIT', 'NPV'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(REVENUE),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(REVENUE),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Num(Sum(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'GROSS PROFIT'}&amp;gt;}REVENUE)/Sum(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'NET REVENUE'}&amp;gt;}REVENUE), '##.0%'),&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'GROSS PROFIT'}&amp;gt;} REVENUE)*0.20,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'GROSS PROFIT'}&amp;gt;} REVENUE)*0.80,&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Num((XNPV(TOTAL &amp;lt;Product&amp;gt;{&amp;lt;TYPE = {'GROSS PROFIT'}&amp;gt;} 0.10, REVENUE, DATE) - XNPV(TOTAL &amp;lt;Product&amp;gt; {&amp;lt;TYPE = {'GeA'}&amp;gt;}0.10, REVENUE*0.2, DATE)), '#,##0.00')&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set analysis seems to be not recognized by the expression editor, but you still numbers when we click okay. The numbers don't really match your requirement, but they do populate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/131411_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2016 07:13:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141900#M901739</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-15T07:13:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using XNPV function</title>
      <link>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141901#M901740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny! &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&gt; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have made some tests and it is working only for the first part of expression. The second part, which starts with '-' sign is ignored retrieving the wrong result. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I will try to test more and do alternative ways after I finish more tests here. As soon as I accomplish it I post results here! &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jul 2016 12:52:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-XNPV-function/m-p/1141901#M901740</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-15T12:52:14Z</dc:date>
    </item>
  </channel>
</rss>

