<?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: Bottom Selling Product Dynamically in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136714#M92382</link>
    <description>&lt;P&gt;Sorry I've noticed you want them in ascending order. So just multiply by -1 the sum in the rank:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;sum({&amp;lt;[Product Name]={"=Rank(&lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;-&lt;/STRONG&gt;&lt;/FONT&gt;sum([Sales Amount]))&amp;lt;=vBottomSellingProducts"}&amp;gt;}&amp;nbsp; [Sales Amount])&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 10 Nov 2023 13:13:21 GMT</pubDate>
    <dc:creator>vincent_ardiet_</dc:creator>
    <dc:date>2023-11-10T13:13:21Z</dc:date>
    <item>
      <title>Bottom Selling Product Dynamically</title>
      <link>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136625#M92366</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I wanted to dynamically calculate the bottom-selling product in my application. Let's say I want the 10 bottom-selling products based on sales amount. I created a variable to be used in my input box, named &lt;/SPAN&gt;&lt;CODE&gt;vBottomSellingProducts&lt;/CODE&gt;&lt;SPAN&gt;. In my straight table, I chose 'Product Name' as my dimension, and I used 'Sales Amount' as my measure. I used the following formula in my expression:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;=aggr(if(rank(sum([Sales Amount])) &amp;lt;= vBottomSellingProducts, sum([Sales Amount]), null()), [Product Name]) as Amount&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Then, I used it in the sort tab on 'Product Name' in ascending order. If I insert 10, for example, into my input box, it would start from the smallest price against the product, say $3,971,546.00, in ascending order. However, if I enter a higher figure, it would start from a price lower than the 3 million above say 242,894.96, in ascending order, as shown in the two screenshots below, if I enter 1 it would give me higher figure 225,357,584.50 as also shown below which is not what I wanted.. Please, what is the correct formula to use to give me the bottom-selling products based on sales amount, in case I enter 1, 2, 5 or 50 etc&amp;nbsp; products in my input box, so that it will still give me the same bottom-selling products?"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="10 bottonmselling product" style="width: 438px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/119716iF2134E933E0741FF/image-size/large?v=v2&amp;amp;px=999" role="button" title="10bottomsellingproduct.PNG" alt="10 bottonmselling product" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;10 bottonmselling product&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="1 bottom selling product" style="width: 532px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/119717i58E2D02FBAF1CF87/image-size/large?v=v2&amp;amp;px=999" role="button" title="1bottom elling product.PNG" alt="1 bottom selling product" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;1 bottom selling product&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="50 bottom selling product" style="width: 503px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/119718iA0BF9D28327BA811/image-size/large?v=v2&amp;amp;px=999" role="button" title="50bottomsellingproduct.PNG" alt="50 bottom selling product" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;50 bottom selling product&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 09:48:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136625#M92366</guid>
      <dc:creator>olaoyesunday</dc:creator>
      <dc:date>2023-11-10T09:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Bottom Selling Product Dynamically</title>
      <link>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136634#M92369</link>
      <description>&lt;P&gt;Try this:&lt;BR /&gt;&lt;SPAN&gt;sum({&amp;lt;[Product Name]={"=Rank(sum([Sales Amount]))&amp;lt;=vBottomSellingProducts"}&amp;gt;}&amp;nbsp; [Sales Amount])&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 10:03:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136634#M92369</guid>
      <dc:creator>vincent_ardiet_</dc:creator>
      <dc:date>2023-11-10T10:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: Bottom Selling Product Dynamically</title>
      <link>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136658#M92375</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/16701"&gt;@vincent_ardiet_&lt;/a&gt;&amp;nbsp;Thanks very much, I used the formular above is still giving me the same thing. or is there anything I ought to check or uncheck in my Sort tab?&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 10:36:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136658#M92375</guid>
      <dc:creator>olaoyesunday</dc:creator>
      <dc:date>2023-11-10T10:36:27Z</dc:date>
    </item>
    <item>
      <title>Re: Bottom Selling Product Dynamically</title>
      <link>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136662#M92376</link>
      <description>&lt;P&gt;Try to add this measure and see what this is returning&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;SPAN&gt;Rank(sum([Sales Amount]))&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 10:40:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136662#M92376</guid>
      <dc:creator>vincent_ardiet_</dc:creator>
      <dc:date>2023-11-10T10:40:49Z</dc:date>
    </item>
    <item>
      <title>Re: Bottom Selling Product Dynamically</title>
      <link>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136675#M92378</link>
      <description>&lt;P&gt;After applying the formular, It was returning these in my screenshot below:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Expression2.PNG" style="width: 647px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/119724i87B904E385CB6279/image-size/large?v=v2&amp;amp;px=999" role="button" title="Expression2.PNG" alt="Expression2.PNG" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="returns.PNG" style="width: 456px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/119725iCE1DE4E0CD2CCBA9/image-size/large?v=v2&amp;amp;px=999" role="button" title="returns.PNG" alt="returns.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 11:01:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136675#M92378</guid>
      <dc:creator>olaoyesunday</dc:creator>
      <dc:date>2023-11-10T11:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Bottom Selling Product Dynamically</title>
      <link>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136676#M92379</link>
      <description>&lt;P&gt;Ok, so now if you replace with this expression (hardcoded rank threshold):&lt;/P&gt;
&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;sum({&amp;lt;[Product Name]={"=Rank(sum([Sales Amount]))&amp;lt;=10"}&amp;gt;}&amp;nbsp; [Sales Amount])&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 11:04:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136676#M92379</guid>
      <dc:creator>vincent_ardiet_</dc:creator>
      <dc:date>2023-11-10T11:04:17Z</dc:date>
    </item>
    <item>
      <title>Re: Bottom Selling Product Dynamically</title>
      <link>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136679#M92380</link>
      <description>&lt;P&gt;When I applied the formular, it returns what is shown in the screenshot below, but when I put one in the formular&amp;nbsp;&lt;SPAN&gt;sum({&amp;lt;[Product Name]={"=Rank(sum([Sales Amount]))&amp;lt;=1"}&amp;gt;}&amp;nbsp; [Sales Amount]) it returns the number I ringed&amp;nbsp;red, which obviously is not what I wanted.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="returns2.PNG" style="width: 491px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/119726iCA9FDF3255BCE66F/image-size/large?v=v2&amp;amp;px=999" role="button" title="returns2.PNG" alt="returns2.PNG" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 11:20:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136679#M92380</guid>
      <dc:creator>olaoyesunday</dc:creator>
      <dc:date>2023-11-10T11:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Bottom Selling Product Dynamically</title>
      <link>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136714#M92382</link>
      <description>&lt;P&gt;Sorry I've noticed you want them in ascending order. So just multiply by -1 the sum in the rank:&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;sum({&amp;lt;[Product Name]={"=Rank(&lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;-&lt;/STRONG&gt;&lt;/FONT&gt;sum([Sales Amount]))&amp;lt;=vBottomSellingProducts"}&amp;gt;}&amp;nbsp; [Sales Amount])&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 13:13:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136714#M92382</guid>
      <dc:creator>vincent_ardiet_</dc:creator>
      <dc:date>2023-11-10T13:13:21Z</dc:date>
    </item>
    <item>
      <title>Re: Bottom Selling Product Dynamically</title>
      <link>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136736#M92386</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/16701"&gt;@vincent_ardiet_&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks very, it works!&lt;/P&gt;</description>
      <pubDate>Fri, 10 Nov 2023 14:09:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Bottom-Selling-Product-Dynamically/m-p/2136736#M92386</guid>
      <dc:creator>olaoyesunday</dc:creator>
      <dc:date>2023-11-10T14:09:01Z</dc:date>
    </item>
  </channel>
</rss>

