Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Between two values

I've created CLE.ContractExpiringin_days, which is the Start Date less todays date, I would now like to show all those that have an expiry date within the next seven days, i.e. expiring in between 0 and 7 days but seem to have a problem when I use the below. Any thoughts?

([CLE.Period Inv_ Start Date] - Today()) as CLE.ContractExpiringin_days,

if (CLE.ContractExpiringin_days >=0 and <=7, 'Yes','No') as CLE.ContractExpiringin7days,

1 Solution

Accepted Solutions
Not applicable
Author

Hi Iain,

I think you have to change your expression to:

if (CLE.ContractExpiringin_days >=0 and CLE.ContractExpiringin_days<=7, 'Yes','No') as CLE.ContractExpiringin7days

Hope this works.

Vincent

View solution in original post

2 Replies
Not applicable
Author

Hi Iain,

I think you have to change your expression to:

if (CLE.ContractExpiringin_days >=0 and CLE.ContractExpiringin_days<=7, 'Yes','No') as CLE.ContractExpiringin7days

Hope this works.

Vincent

Not applicable
Author

Thanks Vincent, nearly worked.  it created another problem that it didn't recognise CLE.ContractExpiringin_days, this was presumably because I'd only just created it in the script.

I took this out and recreated as below, which seems to have worked fine.

Thanks again

if ([CLE.Period Inv_ Start Date] - Today() >=0 and [CLE.Period Inv_ Start Date] - Today() <=7, 'Yes','No') as CLE.ContractExpiringin7days