<?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 If condition to set analysis expression in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/If-condition-to-set-analysis-expression/m-p/2499307#M102971</link>
    <description>&lt;P&gt;Hi All,&lt;BR /&gt;The expression as first expression/Column(1) which counts unique IDs as expected&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sum(Aggr(If(Count(DISTINCT {$&amp;lt;Year={'$(vMaxYear)'}&amp;gt;} IDs) = 1, 1), IDs))&lt;/P&gt;
&lt;P&gt;I have this expression in the next expression tab&lt;/P&gt;
&lt;P&gt;IF(COLUMN(1) &amp;gt; 0 AND LEN(TEL) &amp;gt; 0, COUNT(DISTINCT TEL))&lt;/P&gt;
&lt;P&gt;I’m looking to optimize this for better performance on the front end by incorporating Set Analysis where possible.&lt;/P&gt;
&lt;P&gt;Any suggestions for improvement would be greatly appreciated. Thanks!&lt;/P&gt;</description>
    <pubDate>Wed, 25 Dec 2024 08:27:42 GMT</pubDate>
    <dc:creator>LoKi_asterix</dc:creator>
    <dc:date>2024-12-25T08:27:42Z</dc:date>
    <item>
      <title>If condition to set analysis expression</title>
      <link>https://community.qlik.com/t5/App-Development/If-condition-to-set-analysis-expression/m-p/2499307#M102971</link>
      <description>&lt;P&gt;Hi All,&lt;BR /&gt;The expression as first expression/Column(1) which counts unique IDs as expected&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sum(Aggr(If(Count(DISTINCT {$&amp;lt;Year={'$(vMaxYear)'}&amp;gt;} IDs) = 1, 1), IDs))&lt;/P&gt;
&lt;P&gt;I have this expression in the next expression tab&lt;/P&gt;
&lt;P&gt;IF(COLUMN(1) &amp;gt; 0 AND LEN(TEL) &amp;gt; 0, COUNT(DISTINCT TEL))&lt;/P&gt;
&lt;P&gt;I’m looking to optimize this for better performance on the front end by incorporating Set Analysis where possible.&lt;/P&gt;
&lt;P&gt;Any suggestions for improvement would be greatly appreciated. Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 25 Dec 2024 08:27:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-condition-to-set-analysis-expression/m-p/2499307#M102971</guid>
      <dc:creator>LoKi_asterix</dc:creator>
      <dc:date>2024-12-25T08:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: If condition to set analysis expression</title>
      <link>https://community.qlik.com/t5/App-Development/If-condition-to-set-analysis-expression/m-p/2499631#M103021</link>
      <description>&lt;P&gt;It looks like you already have the proper set analysis. Provided that the "IDs" field are unique IDs, the first expression can be replaced with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count({$&amp;lt;Year={'$(vMaxYear)'}&amp;gt;} DISTINCT IDs)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;{$&amp;lt;Year={'$(vMaxYear)'}&amp;gt;} Count(DISTINCT IDs)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For the second, if I'm understanding this properly, if you were to ensure that the empty values of "TEL" are in fact null, you could use&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;Count({&amp;lt;IDs={"=Count({$&amp;lt;Year={'$(vMaxYear)'}&amp;gt;} DISTINCT IDs)&amp;gt;0"}&amp;gt;} DISTINCT TEL)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Dec 2024 14:21:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/If-condition-to-set-analysis-expression/m-p/2499631#M103021</guid>
      <dc:creator>Daniel_Pilla</dc:creator>
      <dc:date>2024-12-31T14:21:02Z</dc:date>
    </item>
  </channel>
</rss>

