Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dates Function


Hi Everyone

I have a "Termination Date"  field in a datawarehouse which I want to use in a Qlikview application I'm building.

I want to create 3 fields that will show me people to be terminated [in 3 months], [in 2 months], [next month], [current month]  and [terminated] respectively from the current date using the "Termination Date" field from the DW. How can I do this?

1 Solution

Accepted Solutions
Gysbert_Wassenaar

Use the InMonth function:

LOAD

     EmpID,

     [Termination Date],

     if([Termination Date]<=today(),1,0) as Terminated,

     InMonth([Termination Date], today()) as Terminate_ThisMonth,

     InMonth([Termination Date], today(), 1) as Terminate_NextMonth,

     InMonth([Termination Date], today(), 2) as Terminate_InTwoMonths,

     InMonth([Termination Date], today(), 3) as Terminate_InThreeMonths

FROM ...


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar

Use the InMonth function:

LOAD

     EmpID,

     [Termination Date],

     if([Termination Date]<=today(),1,0) as Terminated,

     InMonth([Termination Date], today()) as Terminate_ThisMonth,

     InMonth([Termination Date], today(), 1) as Terminate_NextMonth,

     InMonth([Termination Date], today(), 2) as Terminate_InTwoMonths,

     InMonth([Termination Date], today(), 3) as Terminate_InThreeMonths

FROM ...


talk is cheap, supply exceeds demand
Not applicable
Author

Hi Gysbert

Great funtion! Thanks a lot for your reply