Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying this condtion but this shows an error
if(UW_YEAR<Year(Today()) and Len(OLD_POLICY_NUMBER)>0 , 'renew','lost', if(UW_YEAR<Year(Today()) and Count(Total POLICY_NO)=1, 'lost', 'new'))
first condition
P No. | Old_Policy | Year | |
122 | 132 | 2013 | renew |
134 | 122 | 2014 | renew |
now if this 122 old policy did not find in 2019 means in current year then this should be lost
so data will be
P No. | Old_Policy | Year | |
122 | 132 | 2013 | renew |
134 | 122 | 2014 | lost |
and if this continues then status would be renew ie. .
P No. | Old_Policy | Year | |
122 | 132 | 2013 | renew |
134 | 122 | 2014 | renew |
144 | 134 | 2019 | renew |
second contion
P No. | Old_Policy | Year | |
111 | 2013 | lost | |
131 | 2014 | lost | |
144 | 2019 | new |
if there is no old policy number then this should be lost and if policy no exist in 2019 (always current year) then policies should be new .. if there is 2020 (current year next year) then always new ..
basically trying to combine 2 conditions any help
I think this is what you are looking for. Your if condition can only have two options (if and else). Your first one has three which is why it does not work. (renew, lost, other if)
if(Len(OLD_POLICY_NUMBER)=0 , 'lost',
if(UW_YEAR<Year(Today()) and Len(OLD_POLICY_NUMBER)>0 , 'renew', 'new')
what about this..
Count(Total POLICY_NO)=1
hello ?