Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
danielnevitt
Creator
Creator

Dates

Dear all,

I have a date field (pay_made_dt) and I would like to only include records where the date is greater than 01/01/2018 or is null.

I have set nulldisplay = '-'

If anyone could help with this, it would be much appreciated.

Regards,

Daniel

8 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Try this,

Load * from xyz

where (pay_made_dt >= Makedate(2018) or isnull(pay_made_dt));


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
zhadrakas
Specialist II
Specialist II

Hello Daniel,

maybe this where Statement in script

where

isnull(pay_made_dt) OR Date(pay_made_dt) > Date('01/01/2018')

;

pradosh_thakur
Master II
Master II



something similar to this


load           your_fieldname1,

                  your_fieldname2,

               pay_made_dt


where len(trim(pay_made_dt))=0 or  pay_made_dt > 43101;

Learning never stops.
rahulpawarb
Specialist III
Specialist III

Hello Daniel,

Trust that you are doing well!

Below are two workarounds:

1. Flag Field (Script Level)

Data:

LOAD *,

     If(Len(pay_made_dt)=0 OR pay_made_dt>'01/01/2018', 1, 0) AS Flag;

LOAD * INLINE [

Product, pay_made_dt

Product 1, 01/01/2017

Product 2,

Product 3, 04/01/2018

Product 4, 05/01/2018

Product 5, 06/01/2018

];

2. Expression

If(Len(pay_made_dt)=0 OR pay_made_dt>'01/01/2018', pay_made_dt)

Hope this will help.

Regards!

Rahul Pawar

danielnevitt
Creator
Creator
Author

Thank you for all the responses.

Is it possible to help add the below:

where ((str.restricted_area_flg in ('Y') and c.voucher_fully_paid_dt > '2018-01-01') or c.voucher_fully_paid_dt is null)

Basically I want to show where the restricted_area_flg is Y and then the voucher_fully_paid_dt is either greater than 01/01/2018 or null.

Thanks,

Daniel

sasikanth
Master
Master

Try this

where (str.restricted_area_flg in ='Y'  and pay_made_dt >YearStart(Today()))  OR (  len(trim(pay_made_dt))=0 )

bhargav_bhat
Creator II
Creator II

Hi Daniel,

You can also try

where ((str.restricted_area_flg in ('Y')) and  (c.voucher_fully_paid_dt > '2018-01-01' or c.voucher_fully_paid_dt is null)

Regards,

Bhargav

pradosh_thakur
Master II
Master II

where match(restricted_area_flg,'Y')=1 and (voucher_fully_paid_dt > 43101 or  len(trim(voucher_fully_paid_dt))=0)

Learning never stops.