Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Master III
Master III

Hi Taahir

LOAD *,

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

From Table;

Regards,

Antonio

Not applicable
Author

Worked like a bomb, thanks Antonio