Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

victor_greffet
New Contributor III

Fill empty date field

Hi community,

I have an Excel Data base and I loaded different column. In order to have the date format in my app, I used the date function , but at the same time I wanted to fill empty cells with 'empty'. I have this script (exemple for one column):


DATA :


Load

date(if(len(trim([Target Date]))=0,'empty',    [Target Date])) as     [Target_Date] ,

...


From Excel file.xlsm


But after storing DATA, I realized that I only have dates and nothing when the cell is empty. It works if I remove the function date() but my dates are like numbers


do you have an idea ?



Thank you !

Victor



1 Solution

Accepted Solutions

Re: Fill empty date field

Try this

Load

    If(Len(Trim([Target Date])) = 0, 'empty', Date([Target Date])) as [Target_Date] ,

...

From Excel file.xlsm

3 Replies
antoniotiman
Honored Contributor III

Re: Fill empty date field

May be

Load

f(len(trim([Target Date]))=0,'empty',   Date( [Target Date]))) as     [Target_Date] ,

Re: Fill empty date field

Try this

Load

    If(Len(Trim([Target Date])) = 0, 'empty', Date([Target Date])) as [Target_Date] ,

...

From Excel file.xlsm

victor_greffet
New Contributor III

Re: Fill empty date field

It works,

You're awesome

Thank you !

Community Browser