Forum Discussion

wintergreen13's avatar
wintergreen13
New Member
1 year ago
Solved

Counts based on data from two unconnected tables

Apologies if this is a well-known issue - I'm not sure what to call it or even how to describe my problem in a brief way, so I wasn't able to find any quick YouTube explanations. Here's my setup:

 

I have three tables. Table 1 houses basic demographic data: gender, DOB, the like, with a key ID field. Table 2 houses family composition data: family name, relationship, etc. The relationship between table 1 and 2 is one to many (each person can be in more than one family) based on ID. Table 3 has activity data and tracks when the head of household attended an event. The relationship between table 1 and 3 is also one to many (each person can attend many events) based on ID. There is no relationship between tables 2 and 3.

 

I have been asked to count demographic values, gender for instance, of all of the family members of people who attended events during a period of time. It's easy enough to count this for the head of household, since a row of data is recorded for them each time they attend. But how do I count the other family members who do not have any meaningful tie to the attendance except through the unconnected family composition table? If anyone has any experience with this issue I would love to hear how you dealt with it.

  • Hi wintergreen13

    Thank you for reaching out to the Microsoft fabric community forum.  I reproduced the scenario, and it worked on my end. I used my sample data and successfully implemented it.

     


    I am also including .pbix file for your better understanding, please have a look into it:

    Hope this helps clarify things and let me know what you find after giving these steps a try happy to help you investigate this further.

    Thank you for using the Microsoft Community Forum.

5 Replies