I have a scenario where I have patients who are in a care facility. These patients get various assessments done during their stay such as weight, BMI, blood pressure, cholesterol etc. I display these assessments during a specific month using a slicer which has months like Jan 23, Feb 23 etc to show assessments in Jan 23 or Feb 23 etc.
However, patients can be discharged or they may pass away and at this time their file is closed on the system. This is recorded in a datetime field called FileClosed in my Patients table.
When a patient is no longer in the facility, I don't want to show them. Eg if a patient was discharged on 15 Jan 2023, then in the Jan 23 slicer period, I DO want to see them (they were still a patient in Jan 23 and earlier months), but I don't want to see them in Feb 23.
I am struggling to figure out how I can show a patient before he/she died or was discharged, but exclude them after that point.
Thanks for guidance.