Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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?
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 ...
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 ...
Hi Gysbert
Great funtion! Thanks a lot for your reply