<?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: KPI based on Aggr() function in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79081#M781586</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you tried my 1st answer?&lt;/P&gt;&lt;P&gt;Yeah.. add Business Unit also in Total Qualifier&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;Sum(Total &amp;lt;Item,Store, [Business Unit]&amp;gt; [Quantity sold])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum(Aggr(NoDistinct Sum([Quantity sold]),[Store],[Item],[Business Unit]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Check spelling of all fields&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Mar 2018 09:56:46 GMT</pubDate>
    <dc:creator>MK_QSL</dc:creator>
    <dc:date>2018-03-23T09:56:46Z</dc:date>
    <item>
      <title>KPI based on Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79076#M781581</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a pivot chart to display number of sales and number of returns of items by business unit, store, and by return reason. One item can be associated with several return reasons. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are two KPI in the chart: 1) number of item returns and 2) number of item sales. I use Aggr() function to calculate item sales. Below is an example of the chart:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid #000000;" 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;&lt;STRONG&gt;Business unit&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Store&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Item&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Return reason&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Nb sales&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Nb returns&lt;/STRONG&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;100&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;719&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Broken&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;23&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&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;/TD&gt;&lt;TD style="padding: 2px;"&gt;Change for another item&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;23&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&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;/TD&gt;&lt;TD style="padding: 2px;"&gt;Wrong size&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;23&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;100&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;83&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;A&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;Wrong size&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;15&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;TR&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;/TD&gt;&lt;TD style="padding: 2px;"&gt;Broken&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;15&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;2&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The "Nb sales" has to be a total per item. Return reason should not be taken into account in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If item A was sold 23 times in store 719 and returned 3 times &lt;SPAN style="font-size: 13.3333px;"&gt;then '23' &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;should be displayed on each line (as the example above).&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Here is the expression for 'Nb sales':&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 13.3333px;"&gt;Sum(Aggr(Sum([Quantity sold]),[Store],[Item]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;The only problem is that value '23' is displayed only one time (on one of the return reason lines). How can it be repeated on each return reason line ?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Thank you in advance,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Elina&lt;/SPAN&gt;&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/KPI-based-on-Aggr-function/m-p/79076#M781581</guid>
      <dc:creator>edemerdjieva</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: KPI based on Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79077#M781582</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum(Total &amp;lt;Item,Store&amp;gt; [Quantity sold])&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 09:43:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79077#M781582</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2018-03-23T09:43:32Z</dc:date>
    </item>
    <item>
      <title>Re: KPI based on Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79078#M781583</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;or use&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum(Aggr(NoDistinct Sum([Quantity sold]),[Store],[Item]))&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 09:44:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79078#M781583</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2018-03-23T09:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: KPI based on Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79079#M781584</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Doesn't working. NODISTINCT doubles the result&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 09:54:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79079#M781584</guid>
      <dc:creator>edemerdjieva</dc:creator>
      <dc:date>2018-03-23T09:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: KPI based on Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79080#M781585</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: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;Sum(Total &amp;lt;"&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;business unit" ,&lt;/SPAN&gt;Store,Item&amp;gt; [Quantity sold])&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 09:54:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79080#M781585</guid>
      <dc:creator>oussema_laribi</dc:creator>
      <dc:date>2018-03-23T09:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: KPI based on Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79081#M781586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;have you tried my 1st answer?&lt;/P&gt;&lt;P&gt;Yeah.. add Business Unit also in Total Qualifier&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12px; background-color: #f2f2f2;"&gt;Sum(Total &amp;lt;Item,Store, [Business Unit]&amp;gt; [Quantity sold])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Sum(Aggr(NoDistinct Sum([Quantity sold]),[Store],[Item],[Business Unit]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 12px; background-color: #f2f2f2; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Check spelling of all fields&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 09:56:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79081#M781586</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2018-03-23T09:56:46Z</dc:date>
    </item>
    <item>
      <title>Re: KPI based on Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79082#M781587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It would work if the dimension 'return reason' wasn't included in the chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Without the Aggr() function the expression is always = 0. &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 09:57:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79082#M781587</guid>
      <dc:creator>edemerdjieva</dc:creator>
      <dc:date>2018-03-23T09:57:00Z</dc:date>
    </item>
    <item>
      <title>Re: KPI based on Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79083#M781588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok, now it worked. I had to add all dimensions in the chart to the TOTAL qualifier.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the final expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Sum(TOTAL &amp;lt;[Business Unit], Store, Item&amp;gt; Aggr(Sum([Quantity sold]),&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;[Business Unit], &lt;/SPAN&gt;[Store], [Item]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;Thanks for the help!&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 10:08:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79083#M781588</guid>
      <dc:creator>edemerdjieva</dc:creator>
      <dc:date>2018-03-23T10:08:47Z</dc:date>
    </item>
    <item>
      <title>Re: KPI based on Aggr() function</title>
      <link>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79084#M781589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad that you got your output.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #edf8ca;"&gt;Sum(Aggr(&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #edf8ca;"&gt;TOTAL &amp;lt;[Business Unit], Store, Item&amp;gt; &lt;/SPAN&gt;Sum([Quantity sold]),&lt;/SPAN&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #0000ff; background-color: #edf8ca;"&gt;[Business Unit], &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #edf8ca;"&gt;[Store], [Item]))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #edf8ca;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #edf8ca;"&gt;Have you tried this?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Mar 2018 10:14:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/KPI-based-on-Aggr-function/m-p/79084#M781589</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2018-03-23T10:14:38Z</dc:date>
    </item>
  </channel>
</rss>

