Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Projects expiring 3,6,9 months

I have two fields 'Project_Name' and 'Project_Expiry'. How do I show projects expiring within the next 3, 6, and 9 months ?

Thanks in advance

11 Replies
Anonymous
Not applicable
Author

First you need to make sure if you can use days or months.

like for three months you can use 90,120 days and so on

like this :

if(Today()-Project_Expiry>90, if(Today()-Project_Expiry<120,90))

Thanks

BKC

Not applicable
Author

Thanks but Im not sure if this is quite what I'm after. What I need is a new field to show all projects expiring 'within' the next 3, 6 and 9 months not between ....

Digvijay_Singh

See if this helps -

Load Project, Date(Date#(ProjectExpiry,'DD-MM-YYYY'),'DD-MM-YYYY') as ProjectExpiry inline [

Project, ProjectExpiry

A, 15-10-2015,

B, 15-11-2015,

C, 15-12-2015,

D, 15-01-2016,

E, 15-02-2016

F, 15-03-2016

G, 15-04-2016

H 15-05-2016 ]

projects.PNG

Not applicable
Author

Thanks this looks good. What if I wanted to show the number of projects rather than the names ?

Digvijay_Singh

=Count(if(ProjectExpiry<=Date(AddMonths(Today(),+6)),Project))

Not applicable
Author

Unfortunately still having trouble with the syntax. Fyi my date is a variable called $(vDate)

Digvijay_Singh

You mean you want to replace today() with the variable date? can you share your date format, will provide you the syntax with your date format.

Not applicable
Author

Sorry ignore that.

I used your statement :

=Count(if(ProjectExpiry<=Date(AddMonths(Today(),+6)),Project))


However I get an 'error in calculation' error in my chart. ps the 'project expiry' date format is m/d/yyyy.


Many thanks

MK_QSL
MVP
MVP

=Count(if(Date#(ProjectExpiry,'m/d/yyyy')<=Date(AddMonths(Today(),+6)),Project))