Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
vinod2086
Creator II
Creator II

Matching Values

Hi friends,

I have a below table in that some of the columns emp_id is blank. so my req is if sales id is present and emp id is blank in that case need to display new column as status yes else No.

 

sales_idsales_namesalesemp_idemp_name
1aaa10zz
2bbb20xx
3ccc30123yy
4ddd40456tt
5eee50789vv

Thanks,

1 Solution

Accepted Solutions
vinod2086
Creator II
Creator II
Author

Thanks for reply nag,

i got solution simply i applied if condition

if(IsNull(EMP_ID) and not IsNull(SLS_TTY_ID),'y','n')as new

this condition is working.

View solution in original post

4 Replies
tamilarasu
Champion
Champion

Hi Kumar,

Load *,

If(Len(Trim(emp_id))=0, 'Yes','No') as Status;

LOAD * INLINE [

    sales_id, sales_name, sales, emp_id, emp_name

    1, aaa, 10, , zz

    2, bbb, 20, , xx

    3, ccc, 30, 123, yy

    4, ddd, 40, 456, tt

    5, eee, 50, 789, vv

];

vinod2086
Creator II
Creator II
Author

Thanks for reply nag,

i got solution simply i applied if condition

if(IsNull(EMP_ID) and not IsNull(SLS_TTY_ID),'y','n')as new

this condition is working.

Anil_Babu_Samineni

You can try this too

If(emp_id= '', 'Yes','No') as Status

OR

If(Trim(emp_id)= '', 'Yes','No') as Status

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
tamilarasu
Champion
Champion

I assume that sales_id field cannot be null and thus suggested the above solution.  Anyways, you go the solution. Have a nice day.