Forum Discussion

CB's avatar
CB
Frequent Visitor
8 years ago
Solved

Best Modeling - Joining to multiple records without duplicating/multiplying the values

Hello, I have a dataset where there are multiple patients and each patient has multiple values (several lab results ) . The report needs to have the ability to filter/slice on the diagnosis of the p...
  • CB's avatar
    CB
    8 years ago

    I resolved this by including the diagnosis in the main result data. Even though there are multiple records per lab event if there is more than one diagnosis to a patient, the measures are not duplicating their values. 

     

    I believe the true correct model would be to have a separate table for patients and a separate table with patientId, diagnosis. Then to relate Patient > PatientDiagnosis and relate "labEvent" to Patient. However, when I did this, regardless of the crossjoin and cardinality configuration of the joins/relationships, the measures were not calculating correctly so I had to resort to including the diagnosis in the main labEvent table and not use relationships.