<?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: How can I Replace '-' with Zero quickly or efficiently ? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-can-I-Replace-with-Zero-quickly-or-efficiently/m-p/1867309#M71616</link>
    <description>&lt;P&gt;Presumably, what is taking the time is reading all of the lines. This one formula probably doesn't have any particular impact on the total time. You can test this by reading all of the lines both with and without the formula, or even by loading a subset of the lines, and timing the difference.&lt;/P&gt;
&lt;P&gt;As I said, your best bet is to do this on the first pass of reading your data, without adding a second load just for this one action.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Dec 2021 22:24:43 GMT</pubDate>
    <dc:creator>Or</dc:creator>
    <dc:date>2021-12-06T22:24:43Z</dc:date>
    <item>
      <title>How can I Replace '-' with Zero quickly or efficiently ?</title>
      <link>https://community.qlik.com/t5/App-Development/How-can-I-Replace-with-Zero-quickly-or-efficiently/m-p/1867288#M71611</link>
      <description>&lt;P&gt;I want to replace field values with Zero if value is hyphen i.e. '-'.&lt;/P&gt;
&lt;P&gt;Have tried many things like&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;If Statement&lt;/LI&gt;
&lt;LI&gt;Replace Function&lt;/LI&gt;
&lt;LI&gt;Pick Match&lt;/LI&gt;
&lt;LI&gt;Applymap&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;But all of these are taking lot of time to replace existing values to 0. Can I do this quickly in someway ?&lt;/P&gt;
&lt;P&gt;Data volume is ~274,444,124&lt;/P&gt;
&lt;P&gt;Script Example :&lt;/P&gt;
&lt;P&gt;FinalData:&lt;BR /&gt;NoConcatenate&lt;BR /&gt;LOAD *, if(Rate='-','0',Rate) As [Rate_New] Resident Final;&lt;BR /&gt;Drop Table Final;&lt;BR /&gt;Rename table FinalData to Final;&lt;/P&gt;
&lt;P&gt;Above block itself is taking excessive time. Around 2 to 2.5 hours&lt;/P&gt;
&lt;P&gt;Drop field [Rate_New] from FinalData;&lt;BR /&gt;Rename Field [Rate_New] to [Rate];&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;LI-PRODUCT title="QlikView" id="qlikView"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp; &lt;LI-PRODUCT title="Qlik Analytics Platform" id="qlikAnalyticsPlatform"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 21:12:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-can-I-Replace-with-Zero-quickly-or-efficiently/m-p/1867288#M71611</guid>
      <dc:creator>SRT10</dc:creator>
      <dc:date>2021-12-06T21:12:34Z</dc:date>
    </item>
    <item>
      <title>Re: How can I Replace '-' with Zero quickly or efficiently ?</title>
      <link>https://community.qlik.com/t5/App-Development/How-can-I-Replace-with-Zero-quickly-or-efficiently/m-p/1867303#M71613</link>
      <description>&lt;P&gt;Assuming Rate is always either numeric or a hyphen (I'm assuming it is in fact a hyphen rather than null), you could use alt(Rate, 0). I'd suggest doing this, or whatever other solution you use, in the original load - there's no reason to make a second pass just to do this.However, no matter which function you use, it won't significantly change the loading time unless you're specifically working with an optimized (QVD) load. If that's the case, I'd suggest replacing the values before they go into the QVD rather than doing it after the fact.&lt;/P&gt;
&lt;P&gt;Unrelated, it's quite unusual that it'd take so long for Qlik to read through a few hundred million lines. Unless the lines themselves are very long (insofar as how much data each one contains), this seems like something that should take no more than a few minutes.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 22:01:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-can-I-Replace-with-Zero-quickly-or-efficiently/m-p/1867303#M71613</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-12-06T22:01:01Z</dc:date>
    </item>
    <item>
      <title>Re: How can I Replace '-' with Zero quickly or efficiently ?</title>
      <link>https://community.qlik.com/t5/App-Development/How-can-I-Replace-with-Zero-quickly-or-efficiently/m-p/1867307#M71614</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/6142"&gt;@Or&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;There are around 128 fields for each record entry.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 22:20:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-can-I-Replace-with-Zero-quickly-or-efficiently/m-p/1867307#M71614</guid>
      <dc:creator>SRT10</dc:creator>
      <dc:date>2021-12-06T22:20:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I Replace '-' with Zero quickly or efficiently ?</title>
      <link>https://community.qlik.com/t5/App-Development/How-can-I-Replace-with-Zero-quickly-or-efficiently/m-p/1867309#M71616</link>
      <description>&lt;P&gt;Presumably, what is taking the time is reading all of the lines. This one formula probably doesn't have any particular impact on the total time. You can test this by reading all of the lines both with and without the formula, or even by loading a subset of the lines, and timing the difference.&lt;/P&gt;
&lt;P&gt;As I said, your best bet is to do this on the first pass of reading your data, without adding a second load just for this one action.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 22:24:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-can-I-Replace-with-Zero-quickly-or-efficiently/m-p/1867309#M71616</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-12-06T22:24:43Z</dc:date>
    </item>
    <item>
      <title>Re: How can I Replace '-' with Zero quickly or efficiently ?</title>
      <link>https://community.qlik.com/t5/App-Development/How-can-I-Replace-with-Zero-quickly-or-efficiently/m-p/1867310#M71617</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;BR /&gt;I would leverage the optimized load and Exists statements.. with something like:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;exclude_filter:
Load EmptyRate Inline
[
EmptyRate
-
0
]
;

FinalData:
NoConcatenate
LOAD *, 
'0' As [Rate_New]
Resident Final
where 
Exists(EmptyRate,Rate)
;
Concatenate(FinalData)
LOAD *, 
Rate As [Rate_New]
Resident Final
where not(Exists(EmptyRate,Rate))
;

Drop Table Final;
Rename table FinalData to Final;
Drop Table exclude_filter;


Drop field [Rate] from Final;
Rename Field [Rate_New] to [Rate];
&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Dec 2021 22:26:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-can-I-Replace-with-Zero-quickly-or-efficiently/m-p/1867310#M71617</guid>
      <dc:creator>nfederico360insights</dc:creator>
      <dc:date>2021-12-06T22:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: How can I Replace '-' with Zero quickly or efficiently ?</title>
      <link>https://community.qlik.com/t5/App-Development/How-can-I-Replace-with-Zero-quickly-or-efficiently/m-p/1867346#M71621</link>
      <description>&lt;P&gt;HI&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Try like below&lt;/P&gt;
&lt;P&gt;SET NULLINTERPRET='-';&lt;BR /&gt;NullAsValue *;&lt;BR /&gt;Set NullValue = 0;&lt;/P&gt;
&lt;P&gt;Load * Inline&lt;BR /&gt;[&lt;BR /&gt;A, B, C&lt;BR /&gt;10, -, 1&lt;BR /&gt;5, 4, -&lt;BR /&gt;-, 6, 7&lt;BR /&gt;];&lt;/P&gt;
&lt;P&gt;O/P:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MayilVahanan_0-1638842124412.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/68030iBEC8E7C43E93D873/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MayilVahanan_0-1638842124412.png" alt="MayilVahanan_0-1638842124412.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if its comes from ODBC,&amp;nbsp; instead of&amp;nbsp;NULLINTERPRET, replace with&amp;nbsp;&lt;SPAN&gt;NULLDISPLAY.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;SET NULLDISPLAY=&amp;lt;sym&amp;gt;;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 01:55:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-can-I-Replace-with-Zero-quickly-or-efficiently/m-p/1867346#M71621</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2021-12-07T01:55:47Z</dc:date>
    </item>
    <item>
      <title>Re: How can I Replace '-' with Zero quickly or efficiently ?</title>
      <link>https://community.qlik.com/t5/App-Development/How-can-I-Replace-with-Zero-quickly-or-efficiently/m-p/1867377#M71630</link>
      <description>&lt;P&gt;This looks like at front end or how we can display. I need this in qlikview memory table. needs to generate csv based on this data.&lt;/P&gt;
&lt;P&gt;I am reading data from a qvd.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 05:44:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-can-I-Replace-with-Zero-quickly-or-efficiently/m-p/1867377#M71630</guid>
      <dc:creator>SRT10</dc:creator>
      <dc:date>2021-12-07T05:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: How can I Replace '-' with Zero quickly or efficiently ?</title>
      <link>https://community.qlik.com/t5/App-Development/How-can-I-Replace-with-Zero-quickly-or-efficiently/m-p/1867414#M71633</link>
      <description>&lt;P&gt;Then I'd return to my original suggestion - if possible, edit the data before it gets into the QVD, not while reading it.&amp;nbsp; Literally anything that modifies the data will prevent an optimized reload from QVD, and I can't think of a solution for this with just renaming fields and a simple Exists() statement, which is what you're allowed to use and maintain optimized load (see e.g. &lt;A href="https://www.quickintelligence.co.uk/qlikview-optimised-qvd-loads/" target="_blank"&gt;https://www.quickintelligence.co.uk/qlikview-optimised-qvd-loads/&lt;/A&gt; )&lt;/P&gt;
&lt;P&gt;Possibly you could make this go faster by loading a partial set of data rather than load *, e.g.&lt;/P&gt;
&lt;P&gt;Table1:&lt;/P&gt;
&lt;P&gt;Load * From QVDFile;&lt;/P&gt;
&lt;P&gt;JOIN Load UniqueID, alt(Rate,0) as Rate2&lt;/P&gt;
&lt;P&gt;Resident Table1;&lt;/P&gt;
&lt;P&gt;Drop Field Rate;&lt;/P&gt;
&lt;P&gt;Rename Field Rate2 to Rate;&lt;/P&gt;
&lt;P&gt;I'm not sure if that would go any faster, but might be worth testing.&lt;/P&gt;</description>
      <pubDate>Tue, 07 Dec 2021 08:12:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-can-I-Replace-with-Zero-quickly-or-efficiently/m-p/1867414#M71633</guid>
      <dc:creator>Or</dc:creator>
      <dc:date>2021-12-07T08:12:48Z</dc:date>
    </item>
  </channel>
</rss>

