<?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: Replacing null values and formatting field as numbers in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Replacing-null-values-and-formatting-field-as-numbers/m-p/2499222#M102964</link>
    <description>&lt;P&gt;Slightly an aside, but Alt(Accounts,0) is a cleaner way to achieve the same thing. This has the added benefit of "confirming" that Accounts is a number, because Alt won't pick out a field that lacks a numeric representation.&lt;/P&gt;</description>
    <pubDate>Tue, 24 Dec 2024 07:36:42 GMT</pubDate>
    <dc:creator>Or</dc:creator>
    <dc:date>2024-12-24T07:36:42Z</dc:date>
    <item>
      <title>Replacing null values and formatting field as numbers</title>
      <link>https://community.qlik.com/t5/App-Development/Replacing-null-values-and-formatting-field-as-numbers/m-p/2499190#M102962</link>
      <description>&lt;P&gt;In my data model, I aggregated accounts and assets by EmployeeId number. Many employees do not have assets/accounts, but because I want to retain every employee in the data model, I left joined the summary statistics to the EmployeeId list. To clean the data, I want to replace the null values with 0 and then apply formatting.&lt;/P&gt;
&lt;P&gt;The code I have below doesn't work correctly. The null values in the accounts field are replaced with zero, but they are formatted as text instead of numbers. In the assets field, the original values are formatted as numbers, not currency. And the previously null values are "$0.00" which I would expect. I played around with the&amp;nbsp;&lt;EM&gt;num# &lt;/EM&gt;function&amp;nbsp;and changing the nesting order but couldn't get this to work. Any idea what might be going on or how I can fix it? Thank you for the help.&lt;/P&gt;
&lt;P&gt;FinalCleanTable:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;Load&lt;BR /&gt;EmployeeId,&lt;BR /&gt;num(if(isnull(Accounts), 0, Accounts), '#,##0.') as Accounts,&lt;BR /&gt;num(if(isnull(Assets), 0, Assets), '$#,##0.00') as Assets&lt;BR /&gt;Resident FinalTable;&lt;/P&gt;
&lt;P&gt;Drop Table FinalTable;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2024 20:38:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Replacing-null-values-and-formatting-field-as-numbers/m-p/2499190#M102962</guid>
      <dc:creator>maxcsquared</dc:creator>
      <dc:date>2024-12-23T20:38:37Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing null values and formatting field as numbers</title>
      <link>https://community.qlik.com/t5/App-Development/Replacing-null-values-and-formatting-field-as-numbers/m-p/2499191#M102963</link>
      <description>&lt;P&gt;You can get unexpected results when adding new formatted values to an existing field. Rather than having you post more code, I'll just say that I usually replace the joined nulls using this technique.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://qlikviewcookbook.com/2013/01/filling-default-values-using-mapping/" target="_blank"&gt;https://qlikviewcookbook.com/2013/01/filling-default-values-using-mapping/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;And I handle the formatting of the values like this:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://qlikviewcookbook.com/2016/07/touchless-formatting/" target="_blank"&gt;https://qlikviewcookbook.com/2016/07/touchless-formatting/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;-Rob&lt;BR /&gt;&lt;A href="http://www.easyqlik.com" target="_blank"&gt;http://www.easyqlik.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://masterssummit.com" target="_blank"&gt;http://masterssummit.com&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://qlikviewcookbook.com" target="_blank"&gt;http://qlikviewcookbook.com&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Dec 2024 23:53:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Replacing-null-values-and-formatting-field-as-numbers/m-p/2499191#M102963</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2024-12-23T23:53:26Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing null values and formatting field as numbers</title>
      <link>https://community.qlik.com/t5/App-Development/Replacing-null-values-and-formatting-field-as-numbers/m-p/2499222#M102964</link>
      <description>&lt;P&gt;Slightly an aside, but Alt(Accounts,0) is a cleaner way to achieve the same thing. This has the added benefit of "confirming" that Accounts is a number, because Alt won't pick out a field that lacks a numeric representation.&lt;/P&gt;</description>
      <pubDate>Tue, 24 Dec 2024 07:36:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Replacing-null-values-and-formatting-field-as-numbers/m-p/2499222#M102964</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2024-12-24T07:36:42Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing null values and formatting field as numbers</title>
      <link>https://community.qlik.com/t5/App-Development/Replacing-null-values-and-formatting-field-as-numbers/m-p/2499372#M102977</link>
      <description>&lt;P&gt;Thank you for the resources, really appreciate it!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 15:26:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Replacing-null-values-and-formatting-field-as-numbers/m-p/2499372#M102977</guid>
      <dc:creator>maxcsquared</dc:creator>
      <dc:date>2024-12-26T15:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing null values and formatting field as numbers</title>
      <link>https://community.qlik.com/t5/App-Development/Replacing-null-values-and-formatting-field-as-numbers/m-p/2499374#M102978</link>
      <description>&lt;P&gt;And a few things to clarify:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;what does the Autogenerate function do in the formatting and mapping scripts you linked to?&lt;/LI&gt;
&lt;LI&gt;Do the MAP USING statements get applied after reloading the existing table or before?&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 16:07:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Replacing-null-values-and-formatting-field-as-numbers/m-p/2499374#M102978</guid>
      <dc:creator>maxcsquared</dc:creator>
      <dc:date>2024-12-26T16:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Replacing null values and formatting field as numbers</title>
      <link>https://community.qlik.com/t5/App-Development/Replacing-null-values-and-formatting-field-as-numbers/m-p/2499389#M102983</link>
      <description>&lt;P&gt;"Autogenerate 1" means generate one row in this mapping table -- i.e. do this Load statement once.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularStatements/Load.htm" target="_blank"&gt;https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/ScriptRegularStatements/Load.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;"Do the MAP USING statements get applied after reloading the existing table or before?"&lt;/P&gt;
&lt;P&gt;After.&lt;/P&gt;
&lt;P&gt;-Rob&lt;/P&gt;</description>
      <pubDate>Thu, 26 Dec 2024 23:41:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Replacing-null-values-and-formatting-field-as-numbers/m-p/2499389#M102983</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2024-12-26T23:41:29Z</dc:date>
    </item>
  </channel>
</rss>

