Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikmsg4u
Specialist
Specialist

How to display "Unknown" for missing dates

Hi Members,

I am new to qlikview, i want to know if there is any way to display "Unknown" for any missing date.

ex: in my table i have two fields

name,  dob

a,5/12/1990

b,9/02/1995

c,

d,

if i want to show dob unknown for c and d in a list box how can i achieve this ?

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

DATA:

LOAD

  name,

  if(LEN(TRIM(dob))=0 or IsNull(dob), 'Unknown',dob) as dob;

LOAD

  name,

    Date(dob) as dob

FROM

[New Microsoft Office Excel Worksheet.xlsx]

(ooxml, embedded labels, table is Sheet1);

View solution in original post

17 Replies
Anonymous
Not applicable

in a listbox you can select under "formula" the symbols for null and missing values. there you can define "unknown"

in a Chart the same under presentation

deepakqlikview_123
Specialist
Specialist

or u can simply use if (dob='','unknown',dob) as dob;

qlikmsg4u
Specialist
Specialist
Author

i tried the thing replace - by "unknown" in null values but it is not displaying in list box.any suggestions

simondachstr
Luminary Alumni
Luminary Alumni

Try setting set NullDisplay='Unknown'; before loading the table (Haven't tested it).

qlikmsg4u
Specialist
Specialist
Author

i tried this one also but no use..

here is my script..

LOAD name,

     date(if(dob='','Unknown',dob),'MM/DD/YYYY') as dob1

FROM

[..\New Microsoft Office Excel Worksheet.xlsx]

qlikmsg4u
Specialist
Specialist
Author

not working

Not applicable

hi ,

Try Like this ,

if (len(trim(dob))=0,'unknown',dob) as dob;


Thanks !!!

MK_QSL
MVP
MVP

Load

  name,

  if(LEN(TRIM(dob))=0 or IsNull(dob), 'Unknown',dob) as dob;

Load

  name,

  Date(Date#(dob,'M/DD/YYYY')) as dob

Inline

[

  name,   dob

  a, 5/12/1990

  b, 9/02/1995

  c,

  d,

];

amit_saini
Master III
Master III

Try this:

=If( dob <>0, dob, ' Unknown')

Thanks,
AS