Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
MHarrell
Contributor II
Contributor II

Combining Multiple Fields to One

Hi All,

I have the fields below that return 'yes' if the patient met the criteria to fall in to one of the populations.  I need to create a field to use in a patient detail table that will be one column but will say which population(s) the patient fell into so that I don't have all of these as columns.  I had originally built a large if statement (also below) that was giving me the functionality I wanted but it doesn't work properly due to it not allowing patients to fall into multiple populations.  I have since moved the if statement to the QVD builder  and split it up to create these fields. What's the best way to achieve what I'm trying to accomplish?

"PSI-2 Cases",
"PSI-3 Cases",
"PSI-4 Cases",
"PSI-6 Cases",
"PSI-7 Cases",
"PSI-8 Cases",
"PSI-9 Cases",
"PSI-10 Cases",
"PSI-11 Cases",
"PSI-12 Cases",
"PSI-13 Cases",
"PSI-14 Cases",
"PSI-15 Cases",
"PSI-17 Cases",
"PSI-18 Cases",
"PSI-19 Cases"

if(PSI_02_RATE='1','PSI-2 Cases',
  if(PSI_03_RATE='1','PSI-3 Cases' ,
    if(PSI_04_RATE='1','PSI-4 Cases',
      if(PSI_06_RATE='1','PSI-6 Cases' ,
        if(PSI_07_RATE='1','PSI-7 Cases',
          if(PSI_08_RATE='1','PSI-8 Cases',
            if(PSI_09_RATE='1','PSI-9 Cases',
              if(PSI_10_RATE='1','PSI-10 Cases',
            if(PSI_11_RATE='1','PSI-11 Cases',
          if(PSI_12_RATE='1','PSI-12 Cases',
        if(PSI_13_RATE='1','PSI-13 Cases',
      if(PSI_14_RATE='1','PSI-14 Cases',
    if(PSI_15_RATE='1','PSI-15 Cases',
  if(PSI_17_RATE='1','PSI-17 Cases',
 if(PSI_18_RATE='1','PSI-18 Cases',
if(PSI_19_RATE='1','PSI-19 Cases')))))))))))))))) as AllPSI,

Thanks for any help you can provide!

0 Replies