Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
jiwaniakbar
Contributor II
Contributor II

Parent-Child table data model

Hi

I have a parent -child table

Parent Table has one Row per Family and key is Family ID

Child Table has one Row for each Family member and has Key Family ID and second Key Member ID. It has Occupation data for each member.

Generally everything works fine except one strange scenario when I am using filters.

I have a KPI which says count of Retired Individuals in an Area.

This is simply Count({<PrimaryOccupation={"Retired"}MemberID)

When I select BusinessMan Filter on Primary Occupation, this KPI should be 0. But it still shows some number. When I investigated, I found the problem was it is counting of Families where there are Members with one or more retired and one or more Business Man. This is probably because it is connected by FamilyID. How do I resolve this. I want to see 0 there. Is this data model issue? how do i resolve this. Please help.

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

>> Count({<PrimaryOccupation={"Retired"}MemberID)

The set expression is overriding your selection of BusinessMan. Change the set expression to an intersection with your selections:

Count({<PrimaryOccupation *= "Retired"}MemberID)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

3 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

>> Count({<PrimaryOccupation={"Retired"}MemberID)

The set expression is overriding your selection of BusinessMan. Change the set expression to an intersection with your selections:

Count({<PrimaryOccupation *= "Retired"}MemberID)

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Lisa_P
Employee
Employee

Can you show a picture of your data model ?
jiwaniakbar
Contributor II
Contributor II
Author

Thanks.

Please can you share more detailed concept on this. I always thought the only way to provide condition was use ={"xxx"}