Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
karan_kn
Creator II
Creator II

Create a new field based on values 'Yes' or 'No'

Required to create new field based on Yes or No values.

Capture.JPG

Sample script
LOAD * INLINE [
ID, Option
1, Y
1, N
1, Y
1, Y
2, N
2, N
3, Y
3, Y
3, N
4, N
4, N
4, N
5, N
5, Y
6, N
7, N
7, N

1 Solution

Accepted Solutions
sunny_talwar

Try this

Table:
LOAD * INLINE [
    ID, Option
    1, Y
    1, N
    1, Y
    1, Y
    2, N
    2, N
    3, Y
    3, Y
    3, N
    4, N
    4, N
    4, N
    5, N
    5, Y
    6, N
    7, N
    7, N
];

Left Join (Table)
LOAD ID,
	 MaxString(Option) as NewField
Resident Table
Group By ID;

View solution in original post

3 Replies
sunny_talwar

New field or new row?

karan_kn
Creator II
Creator II
Author

New Field

Capture.JPG

sunny_talwar

Try this

Table:
LOAD * INLINE [
    ID, Option
    1, Y
    1, N
    1, Y
    1, Y
    2, N
    2, N
    3, Y
    3, Y
    3, N
    4, N
    4, N
    4, N
    5, N
    5, Y
    6, N
    7, N
    7, N
];

Left Join (Table)
LOAD ID,
	 MaxString(Option) as NewField
Resident Table
Group By ID;