Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
tas_taba1
Contributor III
Contributor III

Using OR relationship between filters and grouping the results in one row in a pivot table

Hello Qlikkers,

I have a dataset where there exists one to many relationship between the fields- PersonID and Cinema1, Cinema2, Cinema3 and Cinema4-

datasetdataset

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-

problemproblem

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.

Labels (2)
3 Replies
GaryGiles
Specialist
Specialist

You might want to create another table in your load script that restructures the cinema fields.

Cinemas:
Load * inline [
Cinema,CinemaValue,PersonID
];

For i = 1 to 4

  Concatenate (Cinemas)
  Load 'Cinema'&'$(i)' as Cinema,
   Cinema$(i) as CinemaValue,
   PersonID
  Resident Dataset;
next i;

And then filter and group on the CinemaValue field in the presentation.

tas_taba1
Contributor III
Contributor III
Author

Hi Gary,

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-

wrongwrong

It is no longer calculating the standard errors. I am attaching the updated app.

tas_taba1
Contributor III
Contributor III
Author

What I am really looking for is dimension grouping in the front end-

dimension groupingdimension grouping