<?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 Using NUM in set analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-NUM-in-set-analysis/m-p/266649#M499171</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could create this condition as a flag on your script: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load... (your fields, etc) , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ( len (&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM style="color: #808080;"&gt;&lt;EM style="color: #808080;"&gt;Patient.NHSNumber) =10 and isnum( &lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM style="color: #808080;"&gt;&lt;EM style="color: #808080;"&gt;Patient.NHSNumber), 1,0) as patientFlag &lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM style="color: #808080;"&gt;&lt;EM style="color: #808080;"&gt;Resident/From (as your original code) &lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM style="color: #808080;"&gt;&lt;EM style="color: #808080;"&gt;Then, in set analysis, your condition will simply be: &lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM style="color: #808080;"&gt;&lt;EM style="color: #808080;"&gt;count({&amp;lt;Master.formType={'*101*'},year={$(=max(year))},patientFlag={1}&amp;gt;}Master.counter_master)&lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM style="color: #808080;"&gt;&lt;EM style="color: #808080;"&gt;Hope this helps, &lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM style="color: #808080;"&gt;&lt;EM style="color: #808080;"&gt;Erich&lt;BR /&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 07 Jun 2011 01:32:37 GMT</pubDate>
    <dc:creator>erichshiino</dc:creator>
    <dc:date>2011-06-07T01:32:37Z</dc:date>
    <item>
      <title>Using NUM in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-NUM-in-set-analysis/m-p/266647#M499169</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone, &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am struggling with set analysis for a field which I need to check for a certain format. It has to be 10 characters long and be of a numeric value. So farI have this but its not working. Where am I going wrong?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;/SPAN&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM style="color: #808080;"&gt;&lt;EM style="color: #808080;"&gt;&lt;SPAN style="color: #808080;"&gt; &lt;/SPAN&gt;count({&amp;lt;Master.formType={'*101*'},year={$(=max(year))},Patient.NHSNumber=(NUM(Patient.NHSNumber,'0000000000'))}&amp;gt;}Master.counter_master)&lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt;"&gt;&lt;EM style="color: #808080;"&gt;&lt;EM style="color: #808080;"&gt;﻿&lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 15:12:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-NUM-in-set-analysis/m-p/266647#M499169</guid>
      <dc:creator />
      <dc:date>2011-06-06T15:12:34Z</dc:date>
    </item>
    <item>
      <title>Using NUM in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-NUM-in-set-analysis/m-p/266648#M499170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is one workaround - (there are sure to be others!)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Use a search string on your Patient.NHSNumber field like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;len(purgechar([Patient.NHSNumber],'0123456789')) =10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this will strip out the numeric characters and then test the length. So, in theory it will only keep the records having a 10 character numeric value.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;in set analysis you will have to write it like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&amp;lt;[Patient.NHSNumber],={"=len(purgechar([Patient.NHSNumber],'0123456789')) =10"}&amp;gt;}.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The NUM() function you used formats the field it doesn't tell if the field is or isn't a numeric value without additional code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 06 Jun 2011 15:43:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-NUM-in-set-analysis/m-p/266648#M499170</guid>
      <dc:creator>pat_agen</dc:creator>
      <dc:date>2011-06-06T15:43:32Z</dc:date>
    </item>
    <item>
      <title>Using NUM in set analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Using-NUM-in-set-analysis/m-p/266649#M499171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You could create this condition as a flag on your script: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load... (your fields, etc) , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if ( len (&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM style="color: #808080;"&gt;&lt;EM style="color: #808080;"&gt;Patient.NHSNumber) =10 and isnum( &lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM style="color: #808080;"&gt;&lt;EM style="color: #808080;"&gt;Patient.NHSNumber), 1,0) as patientFlag &lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM style="color: #808080;"&gt;&lt;EM style="color: #808080;"&gt;Resident/From (as your original code) &lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM style="color: #808080;"&gt;&lt;EM style="color: #808080;"&gt;Then, in set analysis, your condition will simply be: &lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM style="color: #808080;"&gt;&lt;EM style="color: #808080;"&gt;count({&amp;lt;Master.formType={'*101*'},year={$(=max(year))},patientFlag={1}&amp;gt;}Master.counter_master)&lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM style="color: #808080;"&gt;&lt;EM style="color: #808080;"&gt;Hope this helps, &lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;EM style="color: #808080;"&gt;&lt;EM style="color: #808080;"&gt;Erich&lt;BR /&gt;&lt;/EM&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Jun 2011 01:32:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-NUM-in-set-analysis/m-p/266649#M499171</guid>
      <dc:creator>erichshiino</dc:creator>
      <dc:date>2011-06-07T01:32:37Z</dc:date>
    </item>
  </channel>
</rss>

