5 Replies Latest reply: Jul 31, 2009 5:41 PM by Sally Hurley RSS

    Set analysis using multiple selections in one column to affect table contents

    Sally Hurley

      Greetings,

       

      I have two tables, that are not joined (for a variety of reasons). They are:

      PatientTable: PatientID, PatDiagCode

      DiagTable: DiagCode, DiagDescription

       

      I have a listbox on DiagCode. I want to count PatientIDs of patients that have a PatDiagCode that matches what I've selected in DiagCode. I started with:

      count( distinct { $<PatDiagCode= {$(=DiagCode)}>} PatientID)

      But obviously that doesn't work (unless I've selected only 1 DiagCode). I've tried a number of different ways, but I can't seem to get it to work. I know, if all else fails, I can concatenate DiagCode into a variable, and use that as a list, but I'd really like to avoid that if possible.

      Thanks.