<?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: Totals in a table as a KPI in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383355#M31580</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&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;&lt;STRONG&gt;Avg(Aggr(Sum({&amp;lt;IDCuentaContable={40}&amp;gt;}Monto)/Sum({&amp;lt;IDCuentaContable={40}&amp;gt;}MontoAnterior)/100, Mes))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Oct 2017 15:40:56 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2017-10-03T15:40:56Z</dc:date>
    <item>
      <title>Totals in a table as a KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383348#M31573</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've beeing reading lot of posts to find an answer to my doubt but I can´t reach the right one, so I decided to make a post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have this table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/178357_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;Where:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Venta Mensual actual = Sum(IF(IDCuentaContable=40, Monto))&lt;/P&gt;&lt;P&gt;Venta mensual Anterior = Sum(IF(IDCuentaContable=40, MontoAnterior))&lt;/P&gt;&lt;P&gt;Evolucion ventas = Sum(IF(IDCuentaContable=40, Monto))/Sum(IF(IDCuentaContable=40, MontoAnterior))/100&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All of them are master elements.&lt;/P&gt;&lt;P&gt;I need to filter only account No 40.&lt;/P&gt;&lt;P&gt;Monto Anterior was created from script as follow:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; IF(((Mes-1)=0),0, (Previous(Monto))) as MontoAnterior&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to show the Total of Evolucion Ventas (1.49%) as a KPI&lt;/P&gt;&lt;P&gt;I've tried with a lot of functions but I can´t do it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could I have some help? I´m making my first steps with Qlik Sense &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Oct 2017 00:29:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383348#M31573</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-03T00:29:46Z</dc:date>
    </item>
    <item>
      <title>Re: Totals in a table as a KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383349#M31574</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What is the total mode for &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Evolucion Ventas measure?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Oct 2017 00:51:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383349#M31574</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-10-03T00:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Totals in a table as a KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383350#M31575</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I´m not sure what your question is.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to show the red mark as a KPI&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/178361_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I put the script in my previous post&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Oct 2017 00:57:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383350#M31575</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-03T00:57:41Z</dc:date>
    </item>
    <item>
      <title>Re: Totals in a table as a KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383351#M31576</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not sure how you are calculating 1.49%... can you explain how you get this number?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Oct 2017 01:14:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383351#M31576</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-10-03T01:14:32Z</dc:date>
    </item>
    <item>
      <title>Re: Totals in a table as a KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383352#M31577</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;STRONG style="font-size: 11.7px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A href="https://community.qlik.com/people/fabianaiglesias"&gt;fabianaiglesias&lt;/A&gt;&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm&amp;nbsp; pretty new myself but since you just need the totals as a kpi couldn't you just put your function:&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;Sum(IF(IDCuentaContable=40, Monto))/Sum(IF(IDCuentaContable=40, MontoAnterior))/100&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; into a kpi and get the right result. since the only real difference in the table is that it is grouped by a dimension months.&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;&lt;BR /&gt;&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;i would also stongly recommend you don't use The IF function inside a sum of any other&amp;nbsp; aggragation function as this severely slows down your front end application. so your set analysis should look like 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;sum({&amp;lt;IDCuentaContable = {40}&amp;gt;}, Monto)/ sum({&amp;lt;IDCuentaContable=40&amp;gt;}, MontoAnterior)/100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Elsewise if this doesn't work i think you can do something like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum(aggr(months, &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;sum({&amp;lt;IDCuentaContable = {40}&amp;gt;}, Monto)/ sum({&amp;lt;IDCuentaContable=40&amp;gt;}, MontoAnterior)/100))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this wil first create a table with all evolucion ventas per month and then just make the sum out of it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could be i'm misinterpreting your question so pleas elaborate if this is wrong &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/grin.png" /&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;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Oct 2017 09:44:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383352#M31577</guid>
      <dc:creator>jelle_vervloess1</dc:creator>
      <dc:date>2017-10-03T09:44:19Z</dc:date>
    </item>
    <item>
      <title>Re: Totals in a table as a KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383353#M31578</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sunny, let me explain you a bit more.&lt;/P&gt;&lt;P&gt;This is the complete table:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/178424_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;"Totales" is automatically calculated by Qlik&lt;/P&gt;&lt;P&gt;I made the same process in excel and the values are right&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to reproduce them in KPIs&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Oct 2017 12:21:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383353#M31578</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-03T12:21:32Z</dc:date>
    </item>
    <item>
      <title>Re: Totals in a table as a KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383354#M31579</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jelle,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for you advice with IF function!&lt;/P&gt;&lt;P&gt;I tried the options you gave me and these was the results:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) The script Sum({&amp;lt;IDCuentaContable={40}&amp;gt;}Monto)/Sum({&amp;lt;IDCuentaContable={40}&amp;gt;}MontoAnterior)/100 results in differences between the KPI and the column "Evolucion ventas" as show:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="178430" alt="" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/178430_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I noticed this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if you do 2.158.263,13 / 1.989.000.56 the result is 1.09%&lt;/P&gt;&lt;P&gt;But, if you calculate the average of Evolucion Ventas column, the result will be 1.49%&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So I guess that I need to make an script to calculate the average of the last column (take in account that Totales are automatically calculated by Qlik). And if you repete these calculus in excel they are correct&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) The second script didn´t work:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum(aggr(Mes, (sum({&amp;lt;IDCuentaContable = {40}&amp;gt;} Monto)/ sum({&amp;lt;IDCuentaContable={40}&amp;gt;} MontoAnterior)/100)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="178432" alt="" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/178432_pastedImage_2.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Oct 2017 13:07:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383354#M31579</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-03T13:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: Totals in a table as a KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383355#M31580</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&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;&lt;STRONG&gt;Avg(Aggr(Sum({&amp;lt;IDCuentaContable={40}&amp;gt;}Monto)/Sum({&amp;lt;IDCuentaContable={40}&amp;gt;}MontoAnterior)/100, Mes))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Oct 2017 15:40:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383355#M31580</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-10-03T15:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: Totals in a table as a KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383356#M31581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you give this a shot?&lt;/P&gt;&lt;P&gt;&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;Avg(Aggr(Sum({&amp;lt;IDCuentaContable={40}&amp;gt;}Monto)/Sum({&amp;lt;IDCuentaContable={40}&amp;gt;}MontoAnterior)/100, Mes))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Oct 2017 16:01:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383356#M31581</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-10-03T16:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Totals in a table as a KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383357#M31582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Sunny, your script worked!!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really appreciate you help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 04 Oct 2017 00:38:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Totals-in-a-table-as-a-KPI/m-p/1383357#M31582</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-10-04T00:38:32Z</dc:date>
    </item>
  </channel>
</rss>

