<?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: Displaying a value according to the sums in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Displaying-a-value-according-to-the-sums/m-p/1722345#M54963</link>
    <description>&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;Anyone can help on this topic please?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;T.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jun 2020 20:04:19 GMT</pubDate>
    <dc:creator>tommyl</dc:creator>
    <dc:date>2020-06-25T20:04:19Z</dc:date>
    <item>
      <title>Displaying a value according to the sums</title>
      <link>https://community.qlik.com/t5/App-Development/Displaying-a-value-according-to-the-sums/m-p/1718046#M54536</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a requirement consisting below chart displaying Top5 customers by country:&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;Country&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;customer percentage(ascending order)&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;customer count(ascending order)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;Turkiye&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;60%&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;63&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;UK&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;20%&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;11&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;US&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;5%&lt;/TD&gt;&lt;TD width="33.333333333333336%" height="24px"&gt;13&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;....&lt;/TD&gt;&lt;TD&gt;....&lt;/TD&gt;&lt;TD&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Table displays countries with the highest distinct customer counts and percentages.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dimension: countryName&lt;/P&gt;&lt;P&gt;Measure-Percentage:&amp;nbsp;&amp;nbsp;num(Count({$&amp;lt;[customer.subscriptiondate]={"&amp;lt;=$(vEnd)&amp;gt;=$(vStart)"}&amp;gt;}distinct [customerid])/count(total {$&amp;lt;[customer.subscriptiondate]={"&amp;lt;=$(vEnd)&amp;gt;=$(vStart)"}&amp;gt;}distinct [customerid]), '#,##0.00%')&lt;/P&gt;&lt;P&gt;Measure-Count:&amp;nbsp;Count( {$&amp;lt;[customer.subscriptiondate]={"&amp;lt;=$(vEnd)&amp;gt;=$(vStart)"}&amp;gt;} distinct[customerid])&lt;/P&gt;&lt;P&gt;The requirement is :&lt;/P&gt;&lt;P&gt;To display customers counts by customer segments(SME, SOHO, CORP, INDIV) but, at the initial state, if there is no countryName selection, highest valued customer counts by segments should be displayed.&amp;nbsp;&lt;/P&gt;&lt;P&gt;To illustrate with the above table, if no countryName is selected, within given date range(vEnd and vStart),&lt;/P&gt;&lt;P&gt;(if(isnull(getSelectedCount(countryName)), ....)&lt;/P&gt;&lt;TABLE border="1" width="100%"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="25%"&gt;SME&lt;/TD&gt;&lt;TD width="25%"&gt;SOHO&lt;/TD&gt;&lt;TD width="25%"&gt;CORP&lt;/TD&gt;&lt;TD width="25%"&gt;INDIV&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD width="25%"&gt;40&lt;/TD&gt;&lt;TD width="25%"&gt;12&lt;/TD&gt;&lt;TD width="25%"&gt;8&lt;/TD&gt;&lt;TD width="25%"&gt;3&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As you can see the totals of the segments should be 63 which is the highest-customer-valued country, Turkiye.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For this i did below (to illustrate for SME segments):&lt;/P&gt;&lt;P&gt;=if(isnull(GetFieldSelections([countryName])), max(aggr(count({$&amp;lt;[customer.subscriptiondate]={"&amp;lt;=$(vEnd)&amp;gt;=$(vStart)"}&amp;gt;*&amp;lt;[customer.segment] ={"SME"}&amp;gt;}distinct [customerid]),[countryName])),count({$&amp;lt;[customer.subscriptiondate]={"&amp;lt;=$(vEnd)&amp;gt;=$(vStart)"},[customer.segment] ={'SME'}&amp;gt;}distinct [customerid]))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it displays not Turkiye's SME values because this formula brings "the highest valued 'SME' customer count", not the "highest valued customer count's SME value".&amp;nbsp; Instead of Turkiye, it displays the highest counted SME's value, which is not even in the TOP5 list, Russia. Because Russia has the maximum "SME-customer" count. I just want to display Turkiye's SME count, which has the maximum "customer" count.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please help me on this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;</description>
      <pubDate>Thu, 11 Jun 2020 18:50:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Displaying-a-value-according-to-the-sums/m-p/1718046#M54536</guid>
      <dc:creator>tommyl</dc:creator>
      <dc:date>2020-06-11T18:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying a value according to the sums</title>
      <link>https://community.qlik.com/t5/App-Development/Displaying-a-value-according-to-the-sums/m-p/1722345#M54963</link>
      <description>&lt;P&gt;Hello experts,&lt;/P&gt;&lt;P&gt;Anyone can help on this topic please?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;T.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 20:04:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Displaying-a-value-according-to-the-sums/m-p/1722345#M54963</guid>
      <dc:creator>tommyl</dc:creator>
      <dc:date>2020-06-25T20:04:19Z</dc:date>
    </item>
  </channel>
</rss>

