<?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 Count Distinct Values from Multiple Columns in One KPI in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Count-Distinct-Values-from-Multiple-Columns-in-One-KPI/m-p/1800507#M64862</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am fairly new to developing in Qlik Sense.&amp;nbsp; I am working on creating a KPI to display one value from multiple columns loaded from my script(s).&amp;nbsp; The three columns I have are ADM_CSN, OBV_ADM_CSN and&amp;nbsp;IP_ADM_CSN.&amp;nbsp; Thus far, this is what I have:&lt;/P&gt;&lt;P&gt;=Count(Distinct [ADM_CSN]) + Count({&amp;lt;[IP_ADM_CSN] -= p([ADM_CSN])&amp;gt;}Distinct [IP_ADM_CSN])&lt;/P&gt;&lt;P&gt;I also tried this:&lt;/P&gt;&lt;P&gt;=Count(Distinct([ADM_CSN])) + Count(Distinct([OBV_ADM_CSN])) + Count(Distinct([IP_ADM_CSN]))&lt;/P&gt;&lt;P&gt;These&amp;nbsp;are almost getting me what I need, but not exactly.&amp;nbsp; The first expression does not include my third column and I am not sure exactly how to add it in.&amp;nbsp; Is there a way to do so?&amp;nbsp; The KPI should display 11, but it is displaying 10 because I do not have my third column, which is a value of 1, included.&amp;nbsp; If I can add that column in, it should display 11.&lt;/P&gt;&lt;P&gt;The second expression includes my third column, but is not counting as&amp;nbsp;distinct.&amp;nbsp; For my one&amp;nbsp;example I am testing/validating with, the second expression should display 11 in the KPI.&amp;nbsp; Right now, it is displaying 13, which means it is not distinctly counting the CSN's in the columns, but merely adding them all up, 5+1+7.&lt;/P&gt;&lt;P&gt;Is someone able to help me?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
    <pubDate>Mon, 19 Apr 2021 13:39:00 GMT</pubDate>
    <dc:creator>HelmickC</dc:creator>
    <dc:date>2021-04-19T13:39:00Z</dc:date>
    <item>
      <title>Count Distinct Values from Multiple Columns in One KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Distinct-Values-from-Multiple-Columns-in-One-KPI/m-p/1800507#M64862</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am fairly new to developing in Qlik Sense.&amp;nbsp; I am working on creating a KPI to display one value from multiple columns loaded from my script(s).&amp;nbsp; The three columns I have are ADM_CSN, OBV_ADM_CSN and&amp;nbsp;IP_ADM_CSN.&amp;nbsp; Thus far, this is what I have:&lt;/P&gt;&lt;P&gt;=Count(Distinct [ADM_CSN]) + Count({&amp;lt;[IP_ADM_CSN] -= p([ADM_CSN])&amp;gt;}Distinct [IP_ADM_CSN])&lt;/P&gt;&lt;P&gt;I also tried this:&lt;/P&gt;&lt;P&gt;=Count(Distinct([ADM_CSN])) + Count(Distinct([OBV_ADM_CSN])) + Count(Distinct([IP_ADM_CSN]))&lt;/P&gt;&lt;P&gt;These&amp;nbsp;are almost getting me what I need, but not exactly.&amp;nbsp; The first expression does not include my third column and I am not sure exactly how to add it in.&amp;nbsp; Is there a way to do so?&amp;nbsp; The KPI should display 11, but it is displaying 10 because I do not have my third column, which is a value of 1, included.&amp;nbsp; If I can add that column in, it should display 11.&lt;/P&gt;&lt;P&gt;The second expression includes my third column, but is not counting as&amp;nbsp;distinct.&amp;nbsp; For my one&amp;nbsp;example I am testing/validating with, the second expression should display 11 in the KPI.&amp;nbsp; Right now, it is displaying 13, which means it is not distinctly counting the CSN's in the columns, but merely adding them all up, 5+1+7.&lt;/P&gt;&lt;P&gt;Is someone able to help me?&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 13:39:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Distinct-Values-from-Multiple-Columns-in-One-KPI/m-p/1800507#M64862</guid>
      <dc:creator>HelmickC</dc:creator>
      <dc:date>2021-04-19T13:39:00Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct Values from Multiple Columns in One KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Distinct-Values-from-Multiple-Columns-in-One-KPI/m-p/1800573#M64868</link>
      <description>&lt;P&gt;You may try it in this way:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=Count(Distinct [ADM_CSN]&amp;amp;[OBV_ADM_CSN]&amp;amp;[IP_ADM_CSN])&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 16:02:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Distinct-Values-from-Multiple-Columns-in-One-KPI/m-p/1800573#M64868</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-04-19T16:02:39Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct Values from Multiple Columns in One KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Distinct-Values-from-Multiple-Columns-in-One-KPI/m-p/1800606#M64870</link>
      <description>&lt;P&gt;Hi Marcus,&lt;BR /&gt;&lt;BR /&gt;Thank you so much for your prompt reply.&amp;nbsp; I honestly cannot tell if your solution works or not since the KPI just keeps "calculating".&amp;nbsp; I am not sure why, but it will not display a number at all.&amp;nbsp; Do KPI's sometimes take super long to calculate the expression we enter in?&amp;nbsp; When I revert it back and use my previous function, it works, but when I try to input yours, nothing...&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 17:37:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Distinct-Values-from-Multiple-Columns-in-One-KPI/m-p/1800606#M64870</guid>
      <dc:creator>HelmickC</dc:creator>
      <dc:date>2021-04-19T17:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct Values from Multiple Columns in One KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Distinct-Values-from-Multiple-Columns-in-One-KPI/m-p/1800609#M64871</link>
      <description>&lt;P&gt;It finally stopped and I received this message.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="QlikKPIError.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/53226i342DB663BE3910BB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="QlikKPIError.PNG" alt="QlikKPIError.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 17:42:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Distinct-Values-from-Multiple-Columns-in-One-KPI/m-p/1800609#M64871</guid>
      <dc:creator>HelmickC</dc:creator>
      <dc:date>2021-04-19T17:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Count Distinct Values from Multiple Columns in One KPI</title>
      <link>https://community.qlik.com/t5/App-Development/Count-Distinct-Values-from-Multiple-Columns-in-One-KPI/m-p/1800790#M64897</link>
      <description>&lt;P&gt;Usually it means that the datamodel is unsuitable for this kind of view respectively there are more or less serious gaps or mistakes. The heaviest part on a calculation is to build a virtual table of all included fields related the specific object - those within the dimensions and all from the expressions - which are needed to provide the dimensional context for the aggregations.&lt;/P&gt;&lt;P&gt;If now all of your measure fields come from different tables which may even associated through a link-table such virtual table could be become quite huge and may easily hit a timeout or a RAM limit.&lt;/P&gt;&lt;P&gt;Therefore I suggest to review your datamodel carefully and if it's not a star-scheme to change it in this direction.&lt;/P&gt;&lt;P&gt;- Marcus&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 07:05:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Count-Distinct-Values-from-Multiple-Columns-in-One-KPI/m-p/1800790#M64897</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2021-04-20T07:05:42Z</dc:date>
    </item>
  </channel>
</rss>

