Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jasmina_karcic
Creator III
Creator III

How to fill null field in load editor

Hi experts,

I have a table

T1:

DATE,

PART,

NAME,

DEPARTMENT

VALUE

I for some part, name and department date field is null.

I want to add dates in this field. For example

DATE           PART       NAME   DEPARTMENT   VALUE

30.6.2018    306          A            312                     0

NULL           306          A            312                     0

I want make

DATE           PART       NAME   DEPARTMENT  VALUE

30.6.2018    306          A            312                      0

1.7.2018      306          A            312                      0

2.7.2018      306          A            312                      0

3.7.2018      306          A            312                      0

4.7.2018      306          A            312                      0


Last row is for last date (today())


Thanksss


Jasmina

1 Solution

Accepted Solutions
christophebrault
Specialist
Specialist

Hi,

If you just want to populate data from your date to today, this script will do the job :

// Replace T1 with your source file

T1:
LOAD *,
     Date(Date#(DATE,'DD.M.YYYY'),'DD.M.YYYY') as Date_ID
;

load * inline [
DATE,PART,NAME,DEPARTMENT,VALUE
30.6.2018,306,A,312,0
];


NoConcatenate
FINAL:
LOAD Date_ID+iterno()-1 as Date_ID,
     PART,
     NAME,
     DEPARTMENT,
     VALUE
resident T1
while Date_ID+iterno()-1<=today();

Drop table T1;

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin

View solution in original post

3 Replies
Gysbert_Wassenaar

Have a look at this blog post: How to populate a sparsely populated field


talk is cheap, supply exceeds demand
christophebrault
Specialist
Specialist

Hi,

If you just want to populate data from your date to today, this script will do the job :

// Replace T1 with your source file

T1:
LOAD *,
     Date(Date#(DATE,'DD.M.YYYY'),'DD.M.YYYY') as Date_ID
;

load * inline [
DATE,PART,NAME,DEPARTMENT,VALUE
30.6.2018,306,A,312,0
];


NoConcatenate
FINAL:
LOAD Date_ID+iterno()-1 as Date_ID,
     PART,
     NAME,
     DEPARTMENT,
     VALUE
resident T1
while Date_ID+iterno()-1<=today();

Drop table T1;

Inscrivez vous à ma Newletter Qlik
DoNotMissQlik- Connect with me on Linkedin
jasmina_karcic
Creator III
Creator III
Author

Thank you all, I think I made it...