<?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: Chart Selection not working because of Set Analysis in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Chart-Selection-not-working-because-of-Set-Analysis/m-p/2039521#M85657</link>
    <description>&lt;P&gt;Hi, that's because the set analysis is overwriting your selections, if you want to calculate based on set analysis and selections you can add an * to the values assigned in set analysis:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=COUNT({&amp;lt;AccountClientType&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;*&lt;/FONT&gt;&lt;/STRONG&gt;={"Institutional","High Net Worth"},AccountCode -= {"40*","48*","49*","5*","6*","9*"}&amp;gt;} DISTINCT AccountCode) +&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;COUNT({&amp;lt;AccountCode = {"99988"}&amp;gt;} DISTINCT AccountCode)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 18 Feb 2023 08:27:01 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2023-02-18T08:27:01Z</dc:date>
    <item>
      <title>Chart Selection not working because of Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Chart-Selection-not-working-because-of-Set-Analysis/m-p/2039480#M85652</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have an app with KPIs and pie charts that are powered by master items. One of the KPI has the below Measure to count the number of accounts in scope of that app.&lt;/P&gt;
&lt;P&gt;=COUNT({&amp;lt;AccountClientType={"Institutional","High Net Worth"},AccountCode -= {"40*","48*","49*","5*","6*","9*"}&amp;gt;} DISTINCT AccountCode) +&lt;BR /&gt;COUNT({&amp;lt;AccountCode = {"99988"}&amp;gt;} DISTINCT AccountCode)&lt;/P&gt;
&lt;P&gt;My problem is that whenever I want to do a selection on 'High Net Worth' on a chart for example and only see that category, nothing happens. All other selection on other dimensions work has intended.&lt;/P&gt;
&lt;P&gt;Thx&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Feb 2023 21:11:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Chart-Selection-not-working-because-of-Set-Analysis/m-p/2039480#M85652</guid>
      <dc:creator>JFDemers</dc:creator>
      <dc:date>2023-02-17T21:11:44Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Selection not working because of Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Chart-Selection-not-working-because-of-Set-Analysis/m-p/2039521#M85657</link>
      <description>&lt;P&gt;Hi, that's because the set analysis is overwriting your selections, if you want to calculate based on set analysis and selections you can add an * to the values assigned in set analysis:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;=COUNT({&amp;lt;AccountClientType&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;*&lt;/FONT&gt;&lt;/STRONG&gt;={"Institutional","High Net Worth"},AccountCode -= {"40*","48*","49*","5*","6*","9*"}&amp;gt;} DISTINCT AccountCode) +&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;COUNT({&amp;lt;AccountCode = {"99988"}&amp;gt;} DISTINCT AccountCode)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 18 Feb 2023 08:27:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Chart-Selection-not-working-because-of-Set-Analysis/m-p/2039521#M85657</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2023-02-18T08:27:01Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Selection not working because of Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Chart-Selection-not-working-because-of-Set-Analysis/m-p/2039582#M85659</link>
      <description>&lt;P&gt;G'day&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/218609"&gt;@JFDemers&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Another option is to calculate a flag in the load script like this:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;load &amp;lt;other fields&amp;gt;,
    if( match( AccountClientType, 'Institutional', 'High Net Worth' ) &amp;gt; 0
      , 1, 0 ) as AccountFlag
from &amp;lt;table&amp;gt;;&lt;/LI-CODE&gt;
&lt;P&gt;This will simplify your set analysis and won't affect selections by the user on the AccountClientType field.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;=COUNT({&amp;lt;AccountFlag={1},AccountCode -= {"40*","48*","49*","5*","6*","9*"}&amp;gt;} DISTINCT AccountCode) + COUNT({&amp;lt;AccountCode = {"99988"}&amp;gt;} DISTINCT AccountCode)&lt;/LI-CODE&gt;
&lt;P&gt;Actually, I would take this idea a step further and move the list of account code numbers into a flag as well. This improves performance for the user if the data set is large.&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;
&lt;P&gt;Cheers, Barnaby.&lt;/P&gt;</description>
      <pubDate>Sun, 19 Feb 2023 20:23:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Chart-Selection-not-working-because-of-Set-Analysis/m-p/2039582#M85659</guid>
      <dc:creator>barnabyd</dc:creator>
      <dc:date>2023-02-19T20:23:18Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Selection not working because of Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Chart-Selection-not-working-because-of-Set-Analysis/m-p/2039921#M85694</link>
      <description>&lt;P&gt;Works like a charm!&lt;/P&gt;
&lt;P&gt;Thx a bunch!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 14:15:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Chart-Selection-not-working-because-of-Set-Analysis/m-p/2039921#M85694</guid>
      <dc:creator>JFDemers</dc:creator>
      <dc:date>2023-02-20T14:15:20Z</dc:date>
    </item>
    <item>
      <title>Re: Chart Selection not working because of Set Analysis</title>
      <link>https://community.qlik.com/t5/App-Development/Chart-Selection-not-working-because-of-Set-Analysis/m-p/2039926#M85696</link>
      <description>&lt;P&gt;Thx a lot for the help! I will give it a shot.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Feb 2023 14:18:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Chart-Selection-not-working-because-of-Set-Analysis/m-p/2039926#M85696</guid>
      <dc:creator>JFDemers</dc:creator>
      <dc:date>2023-02-20T14:18:15Z</dc:date>
    </item>
  </channel>
</rss>

