Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
Announcing the newest addition to the Qlik Community, Qlik Gallery! Learn More
Highlighted
Heena
New Contributor III

If two date fields are null, then show nulls as value in calculated dimension

Hi,

I have two date fields, containing values as well as nulls.

I need to show status (which is a calculated dimension) based on these two date fields.

If both date fields are null, then status is ‘Not Required’.

EID

T_Start_D

Due_D

1

1/22/2018

 

2

2/23/2017

_

3

_

9/23/2017

4

3/6/2019

2/23/2011

5

2/23/2017

9/23/2007

6

2/23/2017

2/13/2008

7

_

_

8

2/23/2017

2/23/2017

 

 

Expected result, I need in table as

 

EID

T_Start_D

Due_D

Status

1

1/22/2018

  

2

2/23/2017

-

 

3

-

9/23/2017

 

4

3/6/2019

2/23/2011

 

5

2/23/2017

9/23/2007

 

6

2/23/2017

2/13/2008

 

7

-

-

Not Required

8

2/23/2017

2/23/2017

 

 

Thanks in Advance

 

Regards,

Heena

3 Replies

Re: If two date fields are null, then show nulls as value in calculated dimension

May be something like this

If(Len(Trim(T_Start_D)) = 0 and Len(Trim(Due_D)) = 0, 'Not Required')
Heena
New Contributor III

Re: If two date fields are null, then show nulls as value in calculated dimension

Hi,

Tried this, not working!!!

any other alternative?

Regards,

Heena

Re: If two date fields are null, then show nulls as value in calculated dimension

Lol if this didn't work, I am not sure what the alternative will do... are you able to share a sample where we can see the issue?