<?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: set analysis - isnull in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/set-analysis-isnull/m-p/1739666#M56595</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Another question about your expression:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Count({1-$&amp;lt;A={"*"}&amp;gt;&lt;STRONG&gt;+&amp;lt;C={1},D={1}&lt;/STRONG&gt;&amp;gt;} B)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Isn't&lt;SPAN&gt;&amp;nbsp;'+' operator is 'or'?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I wanted to do - if(A is null and C=1) or (A is null and D=1). How can I do it with 1-$ will be only on A and nor C/D in the expression?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sun, 30 Aug 2020 07:04:55 GMT</pubDate>
    <dc:creator>lotemki1</dc:creator>
    <dc:date>2020-08-30T07:04:55Z</dc:date>
    <item>
      <title>set analysis - isnull</title>
      <link>https://community.qlik.com/t5/App-Development/set-analysis-isnull/m-p/1738884#M56494</link>
      <description>&lt;P&gt;HI all,&lt;/P&gt;&lt;P&gt;I'm trying to understand&amp;nbsp;how can I count B only when A is null. What is the best way, base of performance, and of course, the right calculation.&lt;/P&gt;&lt;P&gt;1. count( {&amp;lt;A={"=Len(Trim([A])) = 0"}&amp;gt;} B)&lt;/P&gt;&lt;P&gt;2. count({&amp;lt;B={"=isnull(A)"}&amp;gt;} B)&lt;/P&gt;&lt;P&gt;3. count({&amp;lt;A={"=isnull(A)"}&amp;gt;} B)&lt;/P&gt;&lt;P&gt;4.&amp;nbsp;Count({1-$&amp;lt;A={"*"}&amp;gt;} B) - if this is the best way, how can I do it with more conditions inside the set analysis ( for example count&amp;nbsp; B if A is null and (C=1 or D=1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is only the options that I saw, if anyone have another way I will be happy to hear.&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:11:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/set-analysis-isnull/m-p/1738884#M56494</guid>
      <dc:creator>lotemki1</dc:creator>
      <dc:date>2024-11-16T18:11:05Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis - isnull</title>
      <link>https://community.qlik.com/t5/App-Development/set-analysis-isnull/m-p/1738896#M56496</link>
      <description>&lt;P&gt;Best way always is that create a flag in script and use it in set like below&lt;/P&gt;&lt;P&gt;LOAD *,&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if(len(trim(A))=0,1,0) as Null_Flag&lt;/P&gt;&lt;P&gt;FROM table;&lt;/P&gt;&lt;P&gt;then use below in your measure&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Count({&amp;lt;Null_Flag={1}&amp;gt;} B)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 16:00:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/set-analysis-isnull/m-p/1738896#M56496</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-08-26T16:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis - isnull</title>
      <link>https://community.qlik.com/t5/App-Development/set-analysis-isnull/m-p/1738904#M56498</link>
      <description>Hi,&lt;BR /&gt;Thanks!&lt;BR /&gt;I have a lot of fields that I want to do it.. So, I don’t want to create a lot of flags and prefer to do it in the UI.&lt;BR /&gt;So what is the best way to do it – not in script&lt;BR /&gt;</description>
      <pubDate>Wed, 26 Aug 2020 16:12:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/set-analysis-isnull/m-p/1738904#M56498</guid>
      <dc:creator>lotemki1</dc:creator>
      <dc:date>2020-08-26T16:12:52Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis - isnull</title>
      <link>https://community.qlik.com/t5/App-Development/set-analysis-isnull/m-p/1738967#M56506</link>
      <description>&lt;P&gt;Although you have lot of fields creating lot of flag is not a problem actually it is advisable.&lt;SPAN&gt;&amp;nbsp;If you need to improve the performance of an expression, or just make an expression easier to write, you will probably need to create a flag field in the script.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I don't think the first 3 options suggested by you will work.&amp;nbsp; 4th option will definitely work.&amp;nbsp; If data is huge&amp;nbsp; then definitely there will have performance&amp;nbsp;impact which you may need to test it out . I am sure script flag method will work better. If you want to use more condition in 4th option then you need to use'+' operator within set like below&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Count({1-$&amp;lt;A={"*"}&amp;gt;&lt;STRONG&gt;+&amp;lt;C={1},D={1}&lt;/STRONG&gt;&amp;gt;} B)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;There is another method within set which you can use it . For that you may need to create unique key in script which you can create it using Rowno() function.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;LOAD *,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; RowNo() as &lt;STRONG&gt;Row&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;FROM source;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Then below set expression&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;=count({&amp;lt;&lt;STRONG&gt;Row&lt;/STRONG&gt;=e({&amp;lt;A={"*"}&amp;gt;})&amp;gt;&lt;STRONG&gt;+&amp;lt;C={1},D={1}&amp;gt;&lt;/STRONG&gt;}B)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;You may need to test out the performance&amp;nbsp; of both of these&amp;nbsp; set options.&amp;nbsp; I am sure the first set method will be faster than using above but I haven't validated.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 Aug 2020 21:38:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/set-analysis-isnull/m-p/1738967#M56506</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-08-26T21:38:45Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis - isnull</title>
      <link>https://community.qlik.com/t5/App-Development/set-analysis-isnull/m-p/1739048#M56520</link>
      <description>&lt;P&gt;Thanks a lot for your response!&lt;/P&gt;&lt;P&gt;I will try both of the ways.. How can I test my performance for each option? what is the best and easy way to check performance of my app?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Aug 2020 07:31:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/set-analysis-isnull/m-p/1739048#M56520</guid>
      <dc:creator>lotemki1</dc:creator>
      <dc:date>2020-08-27T07:31:54Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis - isnull</title>
      <link>https://community.qlik.com/t5/App-Development/set-analysis-isnull/m-p/1739666#M56595</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Another question about your expression:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Count({1-$&amp;lt;A={"*"}&amp;gt;&lt;STRONG&gt;+&amp;lt;C={1},D={1}&lt;/STRONG&gt;&amp;gt;} B)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Isn't&lt;SPAN&gt;&amp;nbsp;'+' operator is 'or'?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I wanted to do - if(A is null and C=1) or (A is null and D=1). How can I do it with 1-$ will be only on A and nor C/D in the expression?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 30 Aug 2020 07:04:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/set-analysis-isnull/m-p/1739666#M56595</guid>
      <dc:creator>lotemki1</dc:creator>
      <dc:date>2020-08-30T07:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis - isnull</title>
      <link>https://community.qlik.com/t5/App-Development/set-analysis-isnull/m-p/1739690#M56600</link>
      <description>&lt;P&gt;You can use document analyzer tool.&lt;/P&gt;</description>
      <pubDate>Sun, 30 Aug 2020 19:03:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/set-analysis-isnull/m-p/1739690#M56600</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-08-30T19:03:31Z</dc:date>
    </item>
    <item>
      <title>Re: set analysis - isnull</title>
      <link>https://community.qlik.com/t5/App-Development/set-analysis-isnull/m-p/1740827#M56709</link>
      <description>&lt;P&gt;You can try below&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;=Count({1-$&amp;lt;A={"*"}&amp;gt;}aggr(only({&amp;lt;C={1}&amp;gt;+&amp;lt;D={1}&amp;gt;}B),B))&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 02 Sep 2020 22:05:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/set-analysis-isnull/m-p/1740827#M56709</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2020-09-02T22:05:07Z</dc:date>
    </item>
  </channel>
</rss>

