Using OR relationship between filters and grouping the results in one row in a pivot table
I have a dataset where there exists one to many relationship between the fields- PersonID and Cinema1, Cinema2, Cinema3 and Cinema4-
Now, I want to have filters in the app where users can choose any cinema from any of the four fields (cinema1,cinema2,cinema3,cinema4) and see the results grouped together in one row. e.g, if a user chooses 'AAA' from fields cinema1 and cinema2, all the PersonID who have AAA in cinema1 AND/OR cinema2 will be grouped together in one row-
For example- in the above picture I want to see all the cases of female with cinemas AAA in any of the four fields grouped in one row. Here, I cannot select the 'AAA' for other cinema fields because it has already filtered out the cases based on the first filter.
I am attaching the dataset and dummy app for reference here. Any suggestions regarding the problem is highly appreciated. Thank you.
Thank you for your response. But unfortunately, this is not working because of the complex data model. Since, the result I want to see in the table includes other fields from the main table (CinemaStratum,CinemaPSU and UtilityWt) as well. For example-
It is no longer calculating the standard errors. I am attaching the updated app.