<?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: Show aggr result, straight table expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Show-aggr-result-straight-table-expression/m-p/1150394#M899608</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well you know your requirement better than me. If this is what is giving you the right numbers, then I say this is the answer &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Jul 2016 17:17:24 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-07-13T17:17:24Z</dc:date>
    <item>
      <title>Show aggr result, straight table expression</title>
      <link>https://community.qlik.com/t5/QlikView/Show-aggr-result-straight-table-expression/m-p/1150387#M899601</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey friends&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have a problem showing the result of an aggr where a sales by item is null.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What im trying to do in the straight table, is to aggr the total sales value of an item category and get the ratio from a specific customer. This ratio is used then, to evaluate the potential by single item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lets say the total item category is making 2200$ total and the selected customer is making 100$ of this category, i will get a ratio of 6.5% which can applied to the single items to evaluate effective sales against potential. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So now my problem is that the aggr function is showing null, on Items with no sales and im not able to calculate the potential.&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/131155_pastedImage_4.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached i have added a sample qvd, where i have taken apart, the steps to get to the result.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think also here the solution is pretty easy, but i did not find a solution&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would be great if somebody could give some advice on this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;many thansk &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&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/Show-aggr-result-straight-table-expression/m-p/1150387#M899601</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Show aggr result, straight table expression</title>
      <link>https://community.qlik.com/t5/QlikView/Show-aggr-result-straight-table-expression/m-p/1150388#M899602</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="131152" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/131152_Capture.PNG" style="height: 256px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;Only({1}&lt;/SPAN&gt;Aggr(NODISTINCT Sum({&amp;lt;Brand, %Item&amp;gt;}QTY*Value), ItemCategory)&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt; /&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color: #ff0000;"&gt;Only({1}&lt;/SPAN&gt;Aggr(NODISTINCT Sum({&amp;lt;Customer, Brand, %Item&amp;gt;}QTY*Value), ItemCategory)&lt;SPAN style="color: #ff0000;"&gt;)&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 15:59:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-aggr-result-straight-table-expression/m-p/1150388#M899602</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-13T15:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Show aggr result, straight table expression</title>
      <link>https://community.qlik.com/t5/QlikView/Show-aggr-result-straight-table-expression/m-p/1150389#M899603</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;based on the sample i send, yes, but there are many item categories which should not be evaluated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lets say i have item category CAT3 to 99 where the customer is not making any turnover... there the valu null woul be ok, otherwise im going to display a item range of 50000 items, where just 200 are of interest. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any possiblity to restrict it, without making the chart global to {1}?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 16:18:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-aggr-result-straight-table-expression/m-p/1150389#M899603</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-13T16:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Show aggr result, straight table expression</title>
      <link>https://community.qlik.com/t5/QlikView/Show-aggr-result-straight-table-expression/m-p/1150390#M899604</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you tested this out? From what I understand, the above expression should work for you, but if it doesn't can you provide a sample where it isn't working the way you would want?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 16:23:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-aggr-result-straight-table-expression/m-p/1150390#M899604</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-13T16:23:01Z</dc:date>
    </item>
    <item>
      <title>Re: Show aggr result, straight table expression</title>
      <link>https://community.qlik.com/t5/QlikView/Show-aggr-result-straight-table-expression/m-p/1150391#M899605</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes, it work but it shows all&amp;nbsp; categories, also the one which are not needed... &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have addedsome items with CAT3&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/131178_pastedImage_1.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;The CAT3 should not be displayed as the selected customer, is not purchasing items from cat3.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks again sunny &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 16:42:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-aggr-result-straight-table-expression/m-p/1150391#M899605</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-13T16:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Show aggr result, straight table expression</title>
      <link>https://community.qlik.com/t5/QlikView/Show-aggr-result-straight-table-expression/m-p/1150392#M899606</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How about now&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 16:46:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-aggr-result-straight-table-expression/m-p/1150392#M899606</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-13T16:46:31Z</dc:date>
    </item>
    <item>
      <title>Re: Show aggr result, straight table expression</title>
      <link>https://community.qlik.com/t5/QlikView/Show-aggr-result-straight-table-expression/m-p/1150393#M899607</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;With your input i got finally the whished result, just not sure whether is the correct way &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sample bellow: Customer2 ist buying 4 Items from CAT1 and CAT2, there is a potential assorment in these CAT1 and CAT2 which he could buy....&lt;/P&gt;&lt;P&gt;&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/131186_pastedImage_0.png" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Expression to reduce data i used;&lt;/P&gt;&lt;P&gt;if(Only({1} Aggr(NODISTINCT Sum({&amp;lt; Brand, %Item&amp;gt;}QTY*Value), ItemCategory)) &amp;gt; 0,&lt;/P&gt;&lt;P&gt; Only({1} Aggr(NODISTINCT Sum({&amp;lt;Customer, Brand, %Item&amp;gt;}QTY*Value), ItemCategory)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you thing about it? &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 17:03:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-aggr-result-straight-table-expression/m-p/1150393#M899607</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-13T17:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: Show aggr result, straight table expression</title>
      <link>https://community.qlik.com/t5/QlikView/Show-aggr-result-straight-table-expression/m-p/1150394#M899608</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well you know your requirement better than me. If this is what is giving you the right numbers, then I say this is the answer &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Jul 2016 17:17:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Show-aggr-result-straight-table-expression/m-p/1150394#M899608</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-07-13T17:17:24Z</dc:date>
    </item>
  </channel>
</rss>

