Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
stonecold111
Creator III
Creator III

need simple if logic

Hi qliks,

I have 5 fields

orderno     catergory       bad1        bad2       bad3                      required field(needs tobe calculated)

1                     a                         yes                                                                        bad

1                     b                                             yes                                                     bad

1                     c                                                                                                          bad                                                                                                   

2                     d                                                                                                        good

2                   e                                                                                                           good

if any of the 3 bad's is yes , that order no should be bad or else good.

anyone help me in writing the logic for required field.

Thanks in advance

Labels (3)
1 Solution

Accepted Solutions
sunny_talwar

May be just this

If(RangeMax(bad1, bad2, bad3) = 'yes', 'bad', 'good')

or

If(SubStringCount(bad1&'|'&bad2&'|'&bad3, 'yes') > 1, 'bad', 'good')

 

View solution in original post

2 Replies
sunny_talwar

May be just this

If(RangeMax(bad1, bad2, bad3) = 'yes', 'bad', 'good')

or

If(SubStringCount(bad1&'|'&bad2&'|'&bad3, 'yes') > 1, 'bad', 'good')

 

stonecold111
Creator III
Creator III
Author

thanks sunny