Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Heena
Contributor III
Contributor III

How to check two date field values are null

Hi All,

I have the data as below, just few records as ex.

EIDT_Start_DDue_D
11/22/2018 
22/23/2017_
3_9/23/2017
43/6/20192/23/2011
52/23/20179/23/2007
62/23/20172/13/2008
7__
82/23/20172/23/2017

 

In Straight table, I need to show if the fields 'T_Start_D' and 'Due_D' are having values as Null or (_) values show as 'Not Required'

 

 

Thanks & Regards,

Heena Kauser

Labels (3)
8 Replies
Anil_Babu_Samineni

Try this?

If(IsNull(T_Start_D) or Match(T_Start_D, '_'), 'Not Required') -- for T_Start_D

If(IsNull(Due_D) or Match(Due_D, '_'), 'Not Required') -- for Due_D

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Heena
Contributor III
Contributor III
Author

Hi ,

 

I tried this below, Not working.

=if(
(
If(len(trim(T_Start_D))= 0 , 'Not Required') )
and
(
If(len(trim(Due_D))= 0 , 'Not Required') )
,'Not Required')

 

 

Thanks & Regards,

Heena Kauser

Anil_Babu_Samineni

Null part may work but not "_" one since Len('_') calculate as 1. So, It is false. 

Anyway, Did you try mine?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Heena
Contributor III
Contributor III
Author

Hi,

 

=If(IsNull([Due Date]) and
IsNull([Target Audience Start Date])
, 'Not Required')

Not working.. I need both fields

Thanks & Regards,

Heena Kauser

Heena
Contributor III
Contributor III
Author

Sorry, My Bad. Its NULL '-' only, I have typed as '_'

Anil_Babu_Samineni

Are you expecting similar below image? If so, use expression as follows

If(Len(T_Start_D)=0 or Match(T_Start_D, '-') or Len(Due_D)=0 or Match(Due_D, '-'), 'Not Required')

Capture.PNG

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Heena
Contributor III
Contributor III
Author

Hi,

 

I need this as below.

EIDT_Start_DDue_DExpected
11/22/2018  
22/23/2017_ 
3_9/23/2017 
43/6/20192/23/2011 
52/23/20179/23/2007 
62/23/20172/13/2008 
7__Not Required
82/23/20172/23/2017 

 

 

 

Thanks & Regards,

Heena Kauser

Heena
Contributor III
Contributor III
Author

Hi,

 

I tried, I am not getting the correct result.

the expected result I want is, if both date fields are Null, then the calculated field should be  shown as ' not required'.

 

Thanks & Regards,

Heena