<?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 SV:Slider and aggregation in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Slider-and-aggregation/m-p/176626#M44563</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Montal,&lt;/P&gt;&lt;P&gt;Thank you for the answer. However, I have implemented the button succesfully, and the text button showing the percentage, still doesn't work.&lt;/P&gt;&lt;P&gt;I am going to make a demo to show where my problem lies.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Wouter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Nov 2010 13:51:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2010-11-24T13:51:11Z</dc:date>
    <item>
      <title>Slider and aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Slider-and-aggregation/m-p/176622#M44559</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a customer table with a sales expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;Sum({$&amp;lt;Year={$(=max(Year))}&amp;gt;}&lt;BR /&gt; if(CurrNo=1,Invoice_NetPriceEUR,if(CurrNo=2,Invoice_NetPriceLocal,Invoice_NetPriceSE)))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;and a gross margin expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;sum({$&amp;lt;Year={$(=max(Year))}&amp;gt;}&lt;BR /&gt; Invoice_MarginSE) / sum({$&amp;lt;Year={$(=max(Year))}&amp;gt;} Invoice_NetPriceSE)&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;These works as expected.&lt;/P&gt;&lt;P&gt;Now, I have a second table where I use a slider object to filter out some customers based on sales limit. So the first expression, that works, looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;sum({$&amp;lt;Year={$(=max(Year))}&amp;gt;}&lt;BR /&gt;if(&lt;BR /&gt; Customer_New=1 and aggr(Sum(if(CurrNo=1,Invoice_NetPriceEUR,if (CurrNo=2,Invoice_NetPriceLocal,Invoice_NetPriceSE))),Customer_No) &amp;gt; vOrderSizeLimit,&lt;BR /&gt; aggr(Sum(if(CurrNo=1,Invoice_NetPriceEUR,if (CurrNo=2,Invoice_NetPriceLocal,Invoice_NetPriceSE))),Customer_No)&lt;BR /&gt; )&lt;BR /&gt; )&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This works as intended. But now I struggle with the gross margin expression and I can't make it work. My suggestion was:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;sum({$&amp;lt;Year={$(=max(Year))}&amp;gt;}&lt;BR /&gt;if(&lt;BR /&gt; Customer_New=1 and aggr(Sum(if(CurrNo=1,Invoice_NetPriceEUR,if(CurrNo=2,Invoice_NetPriceLocal,Invoice_NetPriceSE))),Customer_No) &amp;gt; vOrderSizeLimit,&lt;BR /&gt; aggr(sum( Invoice_MarginSE),customer_No) /&lt;BR /&gt; aggr(sum( Invoice_NetPriceSE), customer_No)&lt;BR /&gt; )&lt;BR /&gt; )&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This gives me nothing, though. I've tried a few other variants but know I feel quite lost. Any help would be appreciated.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 15:43:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slider-and-aggregation/m-p/176622#M44559</guid>
      <dc:creator />
      <dc:date>2010-03-11T15:43:35Z</dc:date>
    </item>
    <item>
      <title>SV:Slider and aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Slider-and-aggregation/m-p/176623#M44560</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I solved the issue with&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;sum({$&amp;lt;Year={$(=max(Year))}&amp;gt;}&lt;BR /&gt;if(&lt;BR /&gt; Customer_New=1 and aggr(Sum(if(CurrNo=1,Invoice_NetPriceEUR,if (CurrNo=2,Invoice_NetPriceLocal,Invoice_NetPriceSE))),Customer_No) &amp;gt; vOrderSizeLimit,&lt;BR /&gt; aggr(sum( Invoice_MarginSE),Customer_No)&lt;BR /&gt; )&lt;BR /&gt; )&lt;BR /&gt;&lt;BR /&gt; /&lt;BR /&gt;&lt;BR /&gt;sum({$&amp;lt;Year={$(=max(Year))}&amp;gt;}&lt;BR /&gt;if(&lt;BR /&gt; Customer_New=1 and aggr(Sum(if(CurrNo=1,Invoice_NetPriceEUR,if (CurrNo=2,Invoice_NetPriceLocal,Invoice_NetPriceSE))),Customer_No) &amp;gt; vOrderSizeLimit,&lt;BR /&gt; aggr(sum( Invoice_NetPriceSE),Customer_No)&lt;BR /&gt; )&lt;BR /&gt; )&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;DIV&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Mar 2010 17:18:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slider-and-aggregation/m-p/176623#M44560</guid>
      <dc:creator />
      <dc:date>2010-03-11T17:18:29Z</dc:date>
    </item>
    <item>
      <title>SV:Slider and aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Slider-and-aggregation/m-p/176624#M44561</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Hákan,&lt;/P&gt;&lt;P&gt;Can you help me too? I am using the formula below for my TOP 20 customers. (And which percentage they are in the total)&lt;/P&gt;&lt;P&gt;(CONCERN_NAAM = client name and OMZET = SALESAMOUNT)&lt;/P&gt;&lt;P&gt;However, I want to have the real 80/20, so I want to take the 20 % of the clients.&lt;/P&gt;&lt;P&gt;I have found these formulas, but I am not succeeding in placing them correctly&lt;/P&gt;&lt;P&gt;Top 80%: if(sum(Sale)&amp;gt; fractile(total aggr(sum(Sale),Name),.2),sum(Sale))&lt;BR /&gt;Bottom 20%: if(sum(Sale)&amp;lt;=fractile(total aggr(sum(Sale),Name),.2),sum(Sale))&lt;/P&gt;&lt;P&gt;Can somebody change the formula below, to reflect the top 20% of the CONCERN_NAAM ?&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;='80/20&lt;BR /&gt;'&amp;amp;&lt;BR /&gt;num(&lt;BR /&gt;sum(total &amp;lt;Periodenummer,CONCERN_NAAM&amp;gt; aggr(&lt;BR /&gt;if(&lt;BR /&gt;rank(sum(OMZET))&amp;lt;=20&lt;BR /&gt;,&lt;BR /&gt;sum(OMZET))&lt;BR /&gt;, CONCERN_NAAM))&lt;/P&gt;&lt;P&gt;/&lt;BR /&gt;sum(total OMZET)&lt;BR /&gt;,'###.##0,00%', ',' , '.' )&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 12:05:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slider-and-aggregation/m-p/176624#M44561</guid>
      <dc:creator />
      <dc:date>2010-11-24T12:05:22Z</dc:date>
    </item>
    <item>
      <title>SV:Slider and aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Slider-and-aggregation/m-p/176625#M44562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Wouter .&lt;/P&gt;&lt;P&gt;Try to use the &lt;STRONG&gt;ParetoSelect&lt;/STRONG&gt; function in a VB macro (triggered by a Button object, or anything else you desire).&lt;/P&gt;&lt;P&gt;Check out this example (VB Macro) which triggers a pareto selection by the Product dimension, according to the ApprovedQuantity measure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;sub&lt;/B&gt; pareto_by_product&lt;/P&gt;&lt;P&gt;&lt;B&gt;set&lt;/B&gt; obj = ActiveDocument.GetSheetObject("BU01")&lt;/P&gt;&lt;P&gt;&lt;B&gt;set&lt;/B&gt; prop = obj.GetProperties&lt;/P&gt;&lt;P&gt;&lt;B&gt;set&lt;/B&gt; f = ActiveDocument.GetField ("FullProdName")&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;if&lt;/B&gt; prop.Text.v="Pareto By Product" &lt;B&gt;then&lt;/B&gt;&lt;/P&gt;&lt;P&gt;f.ParetoSelect "sum(ApprovedQuantity)"&lt;/P&gt;&lt;P&gt;prop.Text.v = "Undo Pareto By Product"&lt;/P&gt;&lt;P&gt;&lt;B&gt;'prop.Type = 2&lt;/B&gt;&lt;/P&gt;&lt;P&gt;obj.SetProperties prop&lt;/P&gt;&lt;P&gt;else&lt;/P&gt;&lt;P&gt;f.clear&lt;/P&gt;&lt;P&gt;prop.Text.v = "Pareto By Product"&lt;/P&gt;&lt;P&gt;obj.SetProperties prop&lt;/P&gt;&lt;P&gt;&lt;B&gt;end&lt;/B&gt; &lt;B&gt;if&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;end sub&lt;/B&gt;&lt;/P&gt;&lt;P dir="rtl"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Montal.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 13:37:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slider-and-aggregation/m-p/176625#M44562</guid>
      <dc:creator />
      <dc:date>2010-11-24T13:37:18Z</dc:date>
    </item>
    <item>
      <title>SV:Slider and aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Slider-and-aggregation/m-p/176626#M44563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Montal,&lt;/P&gt;&lt;P&gt;Thank you for the answer. However, I have implemented the button succesfully, and the text button showing the percentage, still doesn't work.&lt;/P&gt;&lt;P&gt;I am going to make a demo to show where my problem lies.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Wouter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 13:51:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slider-and-aggregation/m-p/176626#M44563</guid>
      <dc:creator />
      <dc:date>2010-11-24T13:51:11Z</dc:date>
    </item>
    <item>
      <title>SV:Slider and aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Slider-and-aggregation/m-p/176627#M44564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, here is the example.&lt;/P&gt;&lt;P&gt;In the two green blocks you can see where I struggle.&lt;/P&gt;&lt;P&gt;One shows the percentage of the top 20 customers,&lt;/P&gt;&lt;P&gt;the other one should show the percentage of the top 20% of customers.&lt;/P&gt;&lt;P&gt;It ain't working &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Wouter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 14:23:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slider-and-aggregation/m-p/176627#M44564</guid>
      <dc:creator />
      <dc:date>2010-11-24T14:23:33Z</dc:date>
    </item>
    <item>
      <title>SV:Slider and aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Slider-and-aggregation/m-p/176628#M44565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi.&lt;/P&gt;&lt;P&gt;I saw the example and still recommend you to try the alternative of the VB macro, why not use an already existing feature?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 15:01:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slider-and-aggregation/m-p/176628#M44565</guid>
      <dc:creator />
      <dc:date>2010-11-24T15:01:35Z</dc:date>
    </item>
    <item>
      <title>SV:Slider and aggregation</title>
      <link>https://community.qlik.com/t5/QlikView/Slider-and-aggregation/m-p/176629#M44566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think if I use this function, I get the percentage of clients that 20% of the customers do with us?&lt;/P&gt;&lt;P&gt;= &lt;B&gt;num&lt;/B&gt; ( &lt;B&gt;if&lt;/B&gt; (&lt;B&gt;sum&lt;/B&gt;(&lt;B&gt;OMZET&lt;/B&gt;)&amp;gt; &lt;B&gt;fractile&lt;/B&gt;(&lt;B&gt;total&lt;/B&gt; &lt;B&gt;aggr&lt;/B&gt;(&lt;B&gt;sum&lt;/B&gt;(&lt;B&gt;OMZET&lt;/B&gt;),&lt;B&gt;CONCERN_NAAM&lt;/B&gt;),0.8),&lt;B&gt;count&lt;/B&gt;(&lt;B&gt;Distinct&lt;/B&gt;(&lt;B&gt;CONCERN_NAAM&lt;/B&gt; )))&lt;/P&gt;&lt;P&gt;/&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P style="font-weight: bold"&gt;count&lt;/P&gt;&lt;B&gt;&lt;/B&gt;&lt;P style="font-weight: bold"&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;,'###.##0,00%', ',' , '.')&lt;/P&gt;(&lt;B&gt;distinct&lt;/B&gt; &lt;B&gt;ID_RELATIE&lt;/B&gt; )&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Nov 2010 16:17:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Slider-and-aggregation/m-p/176629#M44566</guid>
      <dc:creator />
      <dc:date>2010-11-24T16:17:52Z</dc:date>
    </item>
  </channel>
</rss>

