Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Creating a New date field using if statement

Hi

I need some assistance regarding a problem i am facing.

i currently have two date fields and need to combine them to form a single date field based on the status of the item.

if the item is PIS it should take the PIS date, if the item is anything else but PIS it should take the date created date.

Order IDStatusDate createdDate PISCombined Date - Desired
1Created01/01/201701/01/195001/01/2017
2Created02/01/201701/01/195002/01/2017
3Cancelled02/01/201701/01/195002/01/2017
4PIS03/01/201716/01/201716/01/2017
5PIS03/01/201719/01/201719/01/2017

Any ideas would be apreciated

2 Replies
antoniotiman
Honored Contributor III

Re: Creating a New date field using if statement

Hi Taahir

LOAD *,

If(Status='PIS',[Date PIS],[Date Created]) as [Combined Date]

From Table;

Regards,

Antonio

Not applicable

Re: Creating a New date field using if statement

Worked like a bomb, thanks Antonio

Community Browser