Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Filling blank fields with dates

People, I have a problem in my database that I have a field called "[Claim Closed Date]", that sometimes it comes blank for me. I would like to create a rule for that, this rule has to be like this: I have another field called "[Status Claim]" and another one called "[Submitted Date]", so, I would like to put like this in the script:

...

[Claim Closed Date],

[Status Claim],

[Submitted Date],

....

if([Claim Closed Date] = "Blank (?)" and [Status Claim] = 'Closed', FILL WITH [Submitted Date] + "30 days",,)

how do I do such thing in the script??

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Julio

I think you had a misplace bracket, try this.

    if( len(trim([Claim Close Date]))=0 and [Status Claim] = 'Closed', date( [Claim Opened Date] + 60 ) ,[Claim Close Date]) as [Claim Close Date],


Red ) added & second ) before as removed so leaving just one )



Best Regards,     Bill

View solution in original post

14 Replies
jvishnuram
Partner - Creator III
Partner - Creator III

Hi Julio,

Try this

if(isnull([Claim Closed Date])  and [Status Claim] = 'Closed',  Date([Submitted Date] + 30)) as EXPECTED

Anonymous
Not applicable
Author

if( isnull([Claim Closed Date]) and [Status Claim] = 'Closed', date( [Submitted Date] + 30 ) as [Claim Closed Date] ,

maxgro
MVP
MVP

if( len(trim( [Claim Closed Date] ))=0 and [Status Claim] = 'Closed', date( [Submitted Date] + 30 ) as [Claim Closed Date] ,

Not applicable
Author

this one doesn't work fine for me, because i would to be filled out inside the [Claim Closed Date], but thanks

Anonymous
Not applicable
Author

Julio

This will put the data into a field called [Claim Closed Date]

if( isnull([Claim Closed Date]) and [Status Claim] = 'Closed', date( [Submitted Date] + 30 ) as [Claim Closed Date] ,

Not applicable
Author

It doesn't allow me to have two fields with the same name in this case...

Anonymous
Not applicable
Author

Julio

Then get rid of the original one and just leave the new one.

Not applicable
Author

i did, it worked, but brings for me no data on this field now...

Anonymous
Not applicable
Author

Julio

Can you paste in your load script.