<?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: Calculate of a new KPI doesn't work in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Re-Calculate-of-a-new-KPI-doesn-t-work/m-p/778116#M10909</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for the answer.&lt;/P&gt;&lt;P&gt;the result of your suggestion looks like this:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="80837" alt="pic2.PNG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/80837_pic2.PNG" style="height: 349px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this cannot be the right solution (compare the last 3 values).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 16 Mar 2015 12:38:55 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-03-16T12:38:55Z</dc:date>
    <item>
      <title>Re: Calculate of a new KPI doesn't work</title>
      <link>https://community.qlik.com/t5/App-Development/Re-Calculate-of-a-new-KPI-doesn-t-work/m-p/778115#M10908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need to have an aggregation function in your If syntax. Try:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum( f(ConsumptionFrom&amp;lt;=Consumption and Consumption&amp;lt;=ConsumptionTo, BasicRate+EnergyRate*Consumption,-999) )&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 12:21:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Re-Calculate-of-a-new-KPI-doesn-t-work/m-p/778115#M10908</guid>
      <dc:creator>tseebach</dc:creator>
      <dc:date>2015-03-16T12:21:45Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate of a new KPI doesn't work</title>
      <link>https://community.qlik.com/t5/App-Development/Re-Calculate-of-a-new-KPI-doesn-t-work/m-p/778116#M10909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for the answer.&lt;/P&gt;&lt;P&gt;the result of your suggestion looks like this:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="80837" alt="pic2.PNG" class="image-1 jive-image" src="https://community.qlik.com/legacyfs/online/80837_pic2.PNG" style="height: 349px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;but this cannot be the right solution (compare the last 3 values).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 12:38:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Re-Calculate-of-a-new-KPI-doesn-t-work/m-p/778116#M10909</guid>
      <dc:creator />
      <dc:date>2015-03-16T12:38:55Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate of a new KPI doesn't work</title>
      <link>https://community.qlik.com/t5/App-Development/Re-Calculate-of-a-new-KPI-doesn-t-work/m-p/778117#M10910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, now you are getting results. &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt; The Sum function might however not be the right solution.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If a customer has more than 1 set of values, how should these be handled? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And what do you mean by compare last 3 values?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 12:44:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Re-Calculate-of-a-new-KPI-doesn-t-work/m-p/778117#M10910</guid>
      <dc:creator>tseebach</dc:creator>
      <dc:date>2015-03-16T12:44:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate of a new KPI doesn't work</title>
      <link>https://community.qlik.com/t5/App-Development/Re-Calculate-of-a-new-KPI-doesn-t-work/m-p/778118#M10911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;there ist only one row in then table for every customer. so the solution must be unique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in the graphic you can see negative results for the ID 8,5 and 16. a look in the table &lt;/P&gt;&lt;P&gt;together with the formular &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;BasicRate+EnergyRate*Consumption you can see that this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;is not impossible.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 12:52:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Re-Calculate-of-a-new-KPI-doesn-t-work/m-p/778118#M10911</guid>
      <dc:creator />
      <dc:date>2015-03-16T12:52:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate of a new KPI doesn't work</title>
      <link>https://community.qlik.com/t5/App-Development/Re-Calculate-of-a-new-KPI-doesn-t-work/m-p/778119#M10912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No, thats not right. There is more than one row for most customers. Try making a Table and put all fields into it, then select 1 customer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can see that there are multiple rates for each customer. Once the 2 tables are linked. You need to handles these rows, and select the values you wish to calculate on.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is my result for customer 4:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="80844" alt="Untitled copy.png" class="image-1 jive-image" src="/legacyfs/online/80844_Untitled copy.png" style="height: 82px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm assuming that the key is the field Rate?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 13:28:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Re-Calculate-of-a-new-KPI-doesn-t-work/m-p/778119#M10912</guid>
      <dc:creator>tseebach</dc:creator>
      <dc:date>2015-03-16T13:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate of a new KPI doesn't work</title>
      <link>https://community.qlik.com/t5/App-Development/Re-Calculate-of-a-new-KPI-doesn-t-work/m-p/778120#M10913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;But I think I get want you want to do. You like to extract the Rate(s) for a certain consumption. I've would do it using the IntervalMatch in the script. But you can also do it using this expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;sum(&lt;/P&gt;
&lt;P&gt;&amp;nbsp; (if(ConsumptionFrom&amp;lt;=Consumption and Consumption&amp;lt;=ConsumptionTo,EnergyRate,0)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *Consumption)+&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(ConsumptionFrom&amp;lt;=Consumption and Consumption&amp;lt;=ConsumptionTo,BasicRate,0)&lt;/P&gt;
&lt;P&gt;)&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I hope that the parenthesis are placed correctly. Consumption * EnergyRate + BasicRate&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 13:38:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Re-Calculate-of-a-new-KPI-doesn-t-work/m-p/778120#M10913</guid>
      <dc:creator>tseebach</dc:creator>
      <dc:date>2015-03-16T13:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate of a new KPI doesn't work</title>
      <link>https://community.qlik.com/t5/App-Development/Re-Calculate-of-a-new-KPI-doesn-t-work/m-p/778121#M10914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you are right. thank you very much.&lt;/P&gt;&lt;P&gt;it works now so wonderful &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 15:37:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Re-Calculate-of-a-new-KPI-doesn-t-work/m-p/778121#M10914</guid>
      <dc:creator />
      <dc:date>2015-03-16T15:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate of a new KPI doesn't work</title>
      <link>https://community.qlik.com/t5/App-Development/Re-Calculate-of-a-new-KPI-doesn-t-work/m-p/778122#M10915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're welcome. Viel Glück &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/wink.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 16 Mar 2015 15:41:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Re-Calculate-of-a-new-KPI-doesn-t-work/m-p/778122#M10915</guid>
      <dc:creator>tseebach</dc:creator>
      <dc:date>2015-03-16T15:41:55Z</dc:date>
    </item>
  </channel>
</rss>

