cancel
Showing results for 
Search instead for 
Did you mean: 

Comparing data in multiple queries

0 Kudos
85

I am trying to compare data from two queries, one with primary admissions and one with readmissions.

For each readmission I want to count the number of primary admissions which has occurred within 30 days prior to the readmission. See the tables below for an example (the greycells in the readmissions is the variable I am trying to create)

I have tried this

NoOfPrimary = Count([Primary].[log ID] In (Patient ID)) where (DaysBetween([Primary].[Discharge date];[Readmission].[Hospitalize date]) < 30) In (Readmission].[log ID])

where the [Primary].[Patient ID] and the [Readmission].[Patient.ID] are merged.

This provide the result #ERROR

Furthermore I have tried to create details for the date dimensions and tried with the same formula. This provide the result #CONTEXT

Any ideas how to solve this?

Accepted Solutions (0)

Answers (0)