Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
sat_tok52
Creator
Creator

Date Expression

Hi Guru's,

We  have different server types ,each server had allocated different platforms , We have startdate and enddate Date columns ,as per my requirement I have to build logic , If Server have one week  time  is going to reach enddate date that should be show in list box 'near to complete' ,If Server have one week  time  is going to be Start that should be show in list box 'Near to Start'  ,to build these two logic using only Start and end Date Columns ,Any Help.

Thanks,

Sateesh.

3 Replies
avinashelite

will you  be able to share the sample data ??

qliksus
Specialist II
Specialist II

Maybe something like this

today() - Endate <=7 , 'near to complete'

today() - Startdate <=7 , 'near to Start '

Still not sure whether I understood you correctly ?

HirisH_V7
Master
Master

Hi,

check may be like this using the sample Data,

Data:

LOAD *,

ceil(Round(-(Num([Start Date])-Num([End Date])),0.5))&' Days' as Difference,

If(Round(-(Num([Start Date])-Num([End Date])),0.5)<=7,'Near to Complete',

  If(Round(-(Num([Start Date])-Num([End Date])),0.5)=8,'Near to Start')) as Status

INLINE [

    Start Date, End Date

    08/06/2015 3:47:32 AM, 10/06/2015 5:24:00 PM

    18/12/2015 11:34:10 PM, 24/12/2015 7:00:00 PM

    16/12/2015 11:34:10 PM, 24/12/2015 7:00:00 PM

    17/12/2015 11:34:10 PM, 24/12/2015 7:00:00 PM

    29/12/2015 5:42:39 AM, 01/01/2016 12:42:00 AM

    01/01/2016 10:44:39 AM, 01/01/2016 12:00:00 PM

    03/01/2016 12:49:19 AM, 08/01/2016 4:00:00 PM

    03/01/2016 4:48:16 PM, 04/01/2016 8:00:00 AM

];

and at the front end ,

Start Date Week and End Date Week Status-227456.PNG

I hope i understood your'e requirement Half away, can you please specify .If the difference between startdate and enddate is greater than 8 then what status it should specify.

HTH,

PFA,

Hirish

HirisH
“Aspire to Inspire before we Expire!”