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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
andyrebs
Contributor III
Contributor III

Add Days only for selected data

Hello,

I have a table as below:

DescriptionTypeExpire Date
Description1SC12-05-2012
Description2SC

12-05-2012

Description3SF

12-05-2012

Description4SS

12-05-2012

Description5SC

12-05-2012

Description6SF

12-05-2012

I would add in the script 14 days on the Expire date only on the records that have value SS. It is possible?

Thank you

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like

LOAD

Description,

Type,

if(Type = 'SS', date([Expire Date]+14),date([Expire Date]) ) as [Expire Date],

...

from Table;

Your Expire Date must be read in as date type (adjust your standard date format if needed).

hope this helps,

Stefan

View solution in original post

1 Reply
swuehl
MVP
MVP

Maybe like

LOAD

Description,

Type,

if(Type = 'SS', date([Expire Date]+14),date([Expire Date]) ) as [Expire Date],

...

from Table;

Your Expire Date must be read in as date type (adjust your standard date format if needed).

hope this helps,

Stefan