Hi Sara - I am not sure about your data structure, but adding to what Ruben stated, I wanted to provide an example of how this would work with Set Analysis:
Here is some sample data (attached):
Here is what a Set Analysis statement would look like used in the measures:
If interested, you can learn more about Set Analysis here:Introduction to Set Analysis (video) - Part 1
From this series: New to Qlik Sense Videos
I also attached a sample .qvf. Copy to your C:\Users\<user profile>\Documents\Qlik\Sense\Apps and refresh Qlik Sense Desktop using F5.
Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.