Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

URGENT HELP!!!

Field Name

Value

SERIAL NUMBER

Example - A12B34

Contract Flag

This field will have potentially 3 values

C – Under contract based on Contract Start Date and Contract End Date

N – No contract based on the same dates

P – Used to have contracts but does not have any contracts now

For example, the serial number A12B34, has a contract number 0012345678 , which has validity of 04/12/12 to 04/11/13, in this case, the flag will have P as this serial number does not have a contract right now but it used to have in the past.

I got 'C and 'N' but unable to get the 'P'...How to achieve it....Thanks in advance!!!

16 Replies
puttemans
Specialist
Specialist

I've sampled myself, based upon the three dates you haven it shows me. It shows 'N' and 'P', as the dates do not correspond to today (the requisite for 'C'. The small change I had to make was to put the N/C/P between ' ' in order to work.

Not applicable
Author

example.png

Hope this makes sense...

Not applicable
Author

please check the image which i attached.

Not applicable
Author

please check the attached image. The problem is with 'P' because all the contracts which are having a start and end date will fall under 'C' category whereas for 'P' the end dates should be compared with today's date to find whether the end date has exceeded the today's date or not. See the image.

juleshartley
Specialist
Specialist

This should just be down to the ordering in your conditional clause-

=If([Contract End D]= [Contract Start],'N',(

     If([Contract End D]<Today(),'P',(

     'C')))

Not applicable
Author

Still not getting the 'P' value 😞

Not applicable
Author

Yes, its done now...