Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
poluvidyasagar
Creator II
Creator II

Replace Null values with Zeros during mapping?

Hi,

I am trying to achieve the following:

Demand File:

PartDay1Day2Day3Day4
6169746110102015
4017925520151515
860121365555
458079535684
784732954452

PartMasterFile:

PartCategory
61697461B
40179255A
86012136C
45807953B
78473295B
80204418B
15353912B
18760526B
87452160B

DemandFile:

Mapping load

Part as PartNumber,

Num(Day1,0.0)& '|' & Num(Day2,0.0)& '|' &  Num(Day3,0.0) & '|' & Num(Day4,0.0) as [4DayDemand]

From

[DemandFile];

Part MasterFile:

Load

Part as PartNumber,

Category,

Subfield(Applymap('DemandFile',Day1,0) ,'|',1) as Day1,

Subfield(Applymap('DemandFile',Day2,0) ,'|',2) as Day2,

Subfield(Applymap('DemandFile',Day3,0) ,'|',3) as Day3,

Subfield(Applymap('DemandFile',Day4,0) ,'|',4) as Day4,

From[PartMasterFile]

Where Category='B' ;

Result in Qlikview after load:

TableBox:

Dimensions:

1.PartNumber

2.Day1

3.Day2

4.Day3

5.Day4

Result looks the following:

PartCategoryDay1Day2Day3Day4
61697461B10102015
45807953B5684
78473295B4452
80204418B0---
15353912B0---
18760526B0---
87452160B0---

Desired Result:

PartCategoryDay1Day2Day3Day4
61697461B10102015
45807953B5684
78473295B4452
80204418B0000
15353912B0000
18760526B0000
87452160B0000

So, I would like not have those blanks as dashes but as zeroes. It works only Day1 field using subfiled function in the load? How do  i fix this?

Sorry for such a long post

Thanks,

Vidya

Message was edited by: Vidya Sagar Polu

10 Replies
sunny_talwar

No problem brother