<?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: Error with expression : sum(if(Price=min(Price), 1, 0)) in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Error-with-expression-sum-if-Price-min-Price-1-0/m-p/1558439#M40667</link>
    <description>Ohh..My bad...my solution will give overall count not provider wise.&lt;BR /&gt;Can you share sample data?</description>
    <pubDate>Tue, 19 Mar 2019 12:43:59 GMT</pubDate>
    <dc:creator>Shubham_Deshmukh</dc:creator>
    <dc:date>2019-03-19T12:43:59Z</dc:date>
    <item>
      <title>Error with expression : sum(if(Price=min(Price), 1, 0))</title>
      <link>https://community.qlik.com/t5/App-Development/Error-with-expression-sum-if-Price-min-Price-1-0/m-p/1558423#M40664</link>
      <description>&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I need some help for the expression of the last column.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;Provider&lt;/TD&gt;&lt;TD&gt;Product&lt;/TD&gt;&lt;TD&gt;Lowest price&lt;/TD&gt;&lt;TD&gt;#Product at the lowest price&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;ZeCompany&lt;/TD&gt;&lt;TD&gt;Bear&lt;/TD&gt;&lt;TD&gt;= min(Price)&lt;/TD&gt;&lt;TD&gt;= sum(if(Price=min(Price), 1, 0))&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;OtherCompany&lt;/TD&gt;&lt;TD&gt;Bear&lt;/TD&gt;&lt;TD&gt;= min(Price)&lt;/TD&gt;&lt;TD&gt;= sum(if(Price=min(Price), 1, 0))&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A product has a price which change during the year, for example. For each provider, I'ld to know what is the lowest price (=min(Price), it's ok) and how many bears has been sold at this price (= sum(if(Price=min(Price), 1, 0)) but it doesn't work)&lt;/P&gt;&lt;P&gt;Does anyone has an idea how to write this expression?&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 12:27:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Error-with-expression-sum-if-Price-min-Price-1-0/m-p/1558423#M40664</guid>
      <dc:creator>adelmeire</dc:creator>
      <dc:date>2019-03-19T12:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Error with expression : sum(if(Price=min(Price), 1, 0))</title>
      <link>https://community.qlik.com/t5/App-Development/Error-with-expression-sum-if-Price-min-Price-1-0/m-p/1558433#M40665</link>
      <description>&lt;P&gt;Hi &lt;SPAN class=""&gt;&lt;A href="https://community.qlik.com/t5/user/viewprofilepage/user-id/14312" target="_self"&gt;Adelmeire&lt;/A&gt;,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;As per my understanding from your data, you want count of all Bears sold at min price.&lt;/P&gt;&lt;P&gt;Create variable : &lt;STRONG&gt;vMinPrice&lt;/STRONG&gt; = min(Price)&lt;/P&gt;&lt;P&gt;Use exp :&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;=Count(if(Price=&lt;STRONG&gt;vMinPrice&lt;/STRONG&gt;,1))&lt;/PRE&gt;&lt;P&gt;Rather than using '1', if you have any ID corresponding to that product then it would be better to use.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 12:39:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Error-with-expression-sum-if-Price-min-Price-1-0/m-p/1558433#M40665</guid>
      <dc:creator>Shubham_Deshmukh</dc:creator>
      <dc:date>2019-03-19T12:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: Error with expression : sum(if(Price=min(Price), 1, 0))</title>
      <link>https://community.qlik.com/t5/App-Development/Error-with-expression-sum-if-Price-min-Price-1-0/m-p/1558436#M40666</link>
      <description>&lt;P&gt;Thank you for your reply Shubham.&lt;/P&gt;&lt;P&gt;I think your solution won't works, because the variable will calculate the min(Price) for all providers.&lt;/P&gt;&lt;P&gt;Here, I want to count how many products, for each provider, has been sold at the min price of this provider.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 12:41:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Error-with-expression-sum-if-Price-min-Price-1-0/m-p/1558436#M40666</guid>
      <dc:creator>adelmeire</dc:creator>
      <dc:date>2019-03-19T12:41:46Z</dc:date>
    </item>
    <item>
      <title>Re: Error with expression : sum(if(Price=min(Price), 1, 0))</title>
      <link>https://community.qlik.com/t5/App-Development/Error-with-expression-sum-if-Price-min-Price-1-0/m-p/1558439#M40667</link>
      <description>Ohh..My bad...my solution will give overall count not provider wise.&lt;BR /&gt;Can you share sample data?</description>
      <pubDate>Tue, 19 Mar 2019 12:43:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Error-with-expression-sum-if-Price-min-Price-1-0/m-p/1558439#M40667</guid>
      <dc:creator>Shubham_Deshmukh</dc:creator>
      <dc:date>2019-03-19T12:43:59Z</dc:date>
    </item>
    <item>
      <title>Re: Error with expression : sum(if(Price=min(Price), 1, 0))</title>
      <link>https://community.qlik.com/t5/App-Development/Error-with-expression-sum-if-Price-min-Price-1-0/m-p/1558468#M40672</link>
      <description>&lt;P&gt;Try like:&lt;/P&gt;&lt;PRE&gt;Sum(if(Price=Aggr(NODISTINCT Min( Price),Provider), 1,0))&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Mar 2019 13:21:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Error-with-expression-sum-if-Price-min-Price-1-0/m-p/1558468#M40672</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2019-03-19T13:21:55Z</dc:date>
    </item>
    <item>
      <title>Re: Error with expression : sum(if(Price=min(Price), 1, 0))</title>
      <link>https://community.qlik.com/t5/App-Development/Error-with-expression-sum-if-Price-min-Price-1-0/m-p/1558478#M40673</link>
      <description>&lt;P&gt;Great! Thank you.&lt;/P&gt;&lt;P&gt;I forgot NODISTINCT.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 13:40:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Error-with-expression-sum-if-Price-min-Price-1-0/m-p/1558478#M40673</guid>
      <dc:creator>adelmeire</dc:creator>
      <dc:date>2019-03-19T13:40:21Z</dc:date>
    </item>
  </channel>
</rss>

