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

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
sudhee
Contributor
Contributor

compare multiple records with same id and selece the right choice value

Hi my requirement is some thing like this ...

if I found multiple records with an exact match of Plan + ID (plan is no and ID as well )

When the Gender Served field is populated, and the values are not an exact match, and one of the values is Unknown

Then I will choose the value other than Unknown .OR I will default to Both when the values contain both Male and Female

Note: below are examples of the logic.

  • Male, Female, Unknown = Both
  • Male, Female = Both
  • Female, Unknown = Female
  • Male, Unknown = Male
  • Unknown, Unknown = Unknown
  • Male, Male = Male
  • Female, Female = Female
  • Male, Female, Male = Both

Question :- if I have 10 matching records how to compare the values of all of the records for above scenario and get an output as one record .

Labels (3)
1 Reply
JohnRMK
Creator II
Creator II

Hello,

 

You can build a routines that take as a parameter a list and return a string.

You can have a method with switch case. Then call for this routines from a tJavaRow or a tMap

https://www.w3schools.com/java/java_switch.asp