Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
LINKEDIN LIVE: Democratizing data to enhance customer-centricity. JULY 29TH REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
davyqliks
Creator III
Creator III

Date with if statement

Hi Experts,

I hope you are all keeping safe and well.

I have 2 dates in my data load

Issue Date
Voucher Date

My calendar is powered by the Voucher Date.

Voucher date is created when an invoice is posted but i also need to include the Issue date in the model and so wanted to employ an if statement to capture Issue Date as Voucher Date if the voucher date is blank.

Here is my best (just realised not working ) effort.

Date(if(( len([Voucher Date])=0) or [Voucher Date]>0 ,[Voucher Date],[Issue date] ),'DD/MM/YYYY') as [Voucher Date],

Can anyone help to modify this to capture issue date as Voucher date when the voucher date is blank?

Thank you

Daniel

Labels (3)
1 Solution

Accepted Solutions
dilipranjith
Partner
Partner

if( isnull([Voucher Date]) ,[Issue date] ,[Voucher Date])

View solution in original post

4 Replies
dilipranjith
Partner
Partner

your logic seems correct. try changing it to simple isnull() condition

if thats not working either i  feel there maybe some other data coming in. maybe spaces.

davyqliks
Creator III
Creator III
Author

Hi,

Thank you for this.

I am having trouble writing the load statement with the isnull() condition.

Please can you show in my example how you would add this as i am having issue getting syntax correct.

Thank you

dilipranjith
Partner
Partner

if( isnull([Voucher Date]) ,[Issue date] ,[Voucher Date])

View solution in original post

davyqliks
Creator III
Creator III
Author

Thank you,

This worked perfectly.

 

Stay safe out there

 

Daniel