<?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 null fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Set-analysis-null-fields/m-p/1810671#M1212583</link>
    <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/135439"&gt;@JohnSamuel123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I understand corretly, and you want to show a total count of 'Hybrid' in the left text object whether it's old work or not then this should work:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Count({&amp;lt;oldWork={'Hybrid'}&amp;gt;}[EmpName])+ &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Count({&amp;lt;New={'Hybrid)'}&amp;gt;}[EmpName])&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 26 May 2021 10:25:26 GMT</pubDate>
    <dc:creator>a_mullick</dc:creator>
    <dc:date>2021-05-26T10:25:26Z</dc:date>
    <item>
      <title>Set analysis null fields</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-null-fields/m-p/1810632#M1212578</link>
      <description>&lt;P&gt;hi all,&lt;/P&gt;&lt;P&gt;hoping for some help.&lt;/P&gt;&lt;P&gt;Im trying to do&amp;nbsp; set analysis on two fields, its a simple count where if one value in a field is null, it gets the other field.&lt;/P&gt;&lt;P&gt;my calculation is:&amp;nbsp;&lt;/P&gt;&lt;P&gt;=if(isnull(newWork),Count({&amp;lt;oldWork={'Hybrid'}&amp;gt;}[EmpName]), Count({&amp;lt;New={'Hybrid)'}&amp;gt;}[EmpName]))&lt;/P&gt;&lt;P&gt;i have the same calculation but instead of Hybrid it would say "remote", "onsite" etc..&lt;/P&gt;&lt;P&gt;my empname is a unique record.&amp;nbsp;&lt;/P&gt;&lt;P&gt;however when i start filtering by other fields i dont get the correct values in my set analysis?:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JohnSamuel123_1-1622017515761.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/55715iAA2F048C06F487CE/image-size/large?v=v2&amp;amp;px=999" role="button" title="JohnSamuel123_1-1622017515761.png" alt="JohnSamuel123_1-1622017515761.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;what i should be getting in the above is "2" and not "1" (as i have 2 empname records) in my hybrid set analysis.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;any help on how to correctly get the count would be great.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 08:26:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-null-fields/m-p/1810632#M1212578</guid>
      <dc:creator>JohnSamuel123</dc:creator>
      <dc:date>2021-05-26T08:26:55Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis null fields</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-null-fields/m-p/1810671#M1212583</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/135439"&gt;@JohnSamuel123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I understand corretly, and you want to show a total count of 'Hybrid' in the left text object whether it's old work or not then this should work:&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Count({&amp;lt;oldWork={'Hybrid'}&amp;gt;}[EmpName])+ &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Count({&amp;lt;New={'Hybrid)'}&amp;gt;}[EmpName])&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 10:25:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-null-fields/m-p/1810671#M1212583</guid>
      <dc:creator>a_mullick</dc:creator>
      <dc:date>2021-05-26T10:25:26Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis null fields</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-null-fields/m-p/1810673#M1212584</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/18203"&gt;@a_mullick&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you for that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;what i need is for my set anaylsis to check each empname, and if they have a NewWork, use that and add it to the total count, but if NewWork is null, use the iredefaultWork which would never be null.&amp;nbsp;&lt;/P&gt;&lt;P&gt;i dont just want a count of hybrid in both old and new as this may cause an issue as a user may have "Hybrid" in both old and new, causing a duplicate.&lt;/P&gt;&lt;P&gt;i hope that makes sense,&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 10:34:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-null-fields/m-p/1810673#M1212584</guid>
      <dc:creator>JohnSamuel123</dc:creator>
      <dc:date>2021-05-26T10:34:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis null fields</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-null-fields/m-p/1810689#M1212586</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/135439"&gt;@JohnSamuel123&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for clarifying.&lt;/P&gt;&lt;P&gt;I think this should work now.&lt;/P&gt;&lt;P&gt;The first part counts all the new work. It doesn't matter about the NULL() entries here. The second part makes use of the AGGR() function over the EmpName field and flags a 1 if new work is NULL, otherwise 0. Summing this should give the correct 'count' of cases for old work, where new work is NULL().&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;= Count({&amp;lt;[New] = {'Hybrid'}&amp;gt;} EmpName) + &lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;Sum({&amp;lt;[Oldwork] = {'Hybrid'}&amp;gt;} Aggr(Sum({&amp;lt;[Oldwork] = {'Hybrid'}&amp;gt;} If(IsNull([New]), 1, 0)), EmpName))&lt;/FONT&gt; &lt;FONT face="courier new,courier"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 11:40:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-null-fields/m-p/1810689#M1212586</guid>
      <dc:creator>a_mullick</dc:creator>
      <dc:date>2021-05-26T11:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Set analysis null fields</title>
      <link>https://community.qlik.com/t5/QlikView/Set-analysis-null-fields/m-p/1810762#M1212598</link>
      <description>&lt;P&gt;Nulls are a tricky thing when trying to do value calculations&lt;/P&gt;&lt;P&gt;my solution to keep the data very clean is to load the data and just say&amp;nbsp;&lt;/P&gt;&lt;P&gt;if(isnull([New Work]), 'x', [New Work]) as NewWork,&lt;/P&gt;&lt;P&gt;in the load script...then&amp;nbsp;&lt;/P&gt;&lt;P&gt;Load Resident the file again and drop the first table&lt;/P&gt;&lt;P&gt;then there are no NULLS.&amp;nbsp; you can do what you want and it will work every time.&lt;/P&gt;&lt;P&gt;when there are blanks in the tables for some fields and no blanks for some fields, informationally it works, but not really good for calculations on those null fields.&lt;/P&gt;&lt;P&gt;and if you have huge files, I recommend doing the&amp;nbsp;if(isnull([New Work]), 'x', [New Work]) as NewWork,&lt;/P&gt;&lt;P&gt;then Storing the file as a temp qvd...then dropping the first table and actually loading the stored temp table&lt;/P&gt;&lt;P&gt;the reload works cleanly and goes fast. Calculations are spot on&lt;/P&gt;&lt;P&gt;when Left joining multiple tables to the main data table - you end up with nulls in the fields where there is not data to join to the main....so the loading, storing temporarily... dropping the table...then loading that temp table, then cleaning out the nulls with ' ' or 'x' or '0'&amp;nbsp; what ever you think is appropriate makes for a very useful file with no nulls to deal with.&amp;nbsp; you will also notice you won't have any display glitches when they are searching on one of those left joined fields...you cannot select on blanks or nulls, but you can on the replaced values.&amp;nbsp; this is useful for cleaning up data for engineering purposes...finding related fields missing data.&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 26 May 2021 14:06:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Set-analysis-null-fields/m-p/1810762#M1212598</guid>
      <dc:creator>suepenick</dc:creator>
      <dc:date>2021-05-26T14:06:00Z</dc:date>
    </item>
  </channel>
</rss>

