Set analysis problem, pivot table expression, missing data.
This is my scenario:
I have a list of patients. Each patient has been enrolled on a trail. Each patient could have enrolled on a different date. We need to look at the number of admissions for each patient for the year before the trial started and the year following the trial. I have constructed some set analysis that does what I need and appears to work, it is used as the expression in a pivot table.
I tested the set analysis with an individual patient selected and got the results I expected. However when I removed the selection from the patients instead of seeing a populated pivot with all the patients in my group the table was empty. If I select an individual patient I see results... what am I doing wrong?
Here is the set analysis for getting the previous year: