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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
raadwiptec
Creator II
Creator II

date

Hi,

I want to do this in expression.

I have 2 columns Opening Date and closing Date, Lastupdatedate

I need to Add 1 year to an existing date column .. for ex: I So for a condition if closing date is null then take the date from opening Date and Add 1 year.

2 condition - If opening Date is null then take the date from Lastupdatedate and add 15 months.

any suggestions?

Labels (1)
1 Solution

Accepted Solutions
raadwiptec
Creator II
Creator II
Author

hi

i found the solution ... i need it in expression basically.. it is if(IsNull(ClsoingDate), Date(AddYears(OpeningDate,1), ClosingDate))

View solution in original post

2 Replies
swuehl
Champion III
Champion III

Maybe like

LOAD

     OpeningDate,

     If(IsNum(ClosingDate),ClosingDate,  If(IsNum(OpeningDate),AddYears(OpeningDate,1),AddMonths(LastUpdateDate,15))) as ClosingDate,

     LastUpdateDate,

     ....

FROM ..;

raadwiptec
Creator II
Creator II
Author

hi

i found the solution ... i need it in expression basically.. it is if(IsNull(ClsoingDate), Date(AddYears(OpeningDate,1), ClosingDate))