# Datasets: Join contacts as secondary source?

**URL:** <https://community.hubspot.com/t/datasets-join-contacts-as-secondary-source/118266>\
**Category:** Data Hub\
**Tags:** datasets\
**Created:** [October 13, 2024, 10:37am UTC](https://community.hubspot.com/t/datasets-join-contacts-as-secondary-source/118266 "2024-10-13T10:37:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fiberpunk](https://avatars.discourse-cdn.com/v4/letter/f/a87d85/32.png) [@fiberpunk](https://community.hubspot.com/u/fiberpunk)\
**Post date:** [October 13, 2024, 10:37am UTC](https://community.hubspot.com/t/datasets-join-contacts-as-secondary-source/118266/1 "2024-10-13T10:37:51Z")

</div>

Hey folks,

In my database, I have some contacts who are affiliates who are referring new contacts. When that happens, a new contact will store the affiliate ID of the person it has been referred by.

Now, in my dataset I want to join the affiliates to the contacts they have been referred by via their corresponding id. So I need primary contacts, and secondary contacts as sources.

In the setup this looks kinda good, BUT in my dataset config it recognizes only the primary contacts. Two contact sources are both shown as primary, and they also really are the same, ie. trying to use any values from the bottom group will only bring up values from the primary contacts. Also when I expand or collapse one group, the second group does it in tandem.

So basically it does not recognize the joined contacts as secondary source. Has anyone ever come across this?

Cheers!

 ![Screenshot 2024-10-13 at 12.25.22.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/a/b/abff4b9c7776010082f99c46ebf731f89656a44f.png)

 ![Screenshot 2024-10-13 at 12.25.48.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/e/b/ebf35fa7992b320b96375b7ccc0610fba4524b76.png)

---

<div class="post-metadata">

**Author:** ![Berangere](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/berangere/32/220784_2.png) [@Berangere](https://community.hubspot.com/u/Berangere)\
**Post date:** [October 14, 2024, 8:53am UTC](https://community.hubspot.com/t/datasets-join-contacts-as-secondary-source/118266/2 "2024-10-14T08:53:42Z")

</div>

Hi @fiberpunk, I hope that you are well!  
Thank you for asking the Community!  
I understand that “Affiliate ID” is a custom contact property and you’d like to view in a report the two types of contacts. Please let me know if that’s not the case.  
I have found the solution from @RSchweighart on this post “[Compare two types of contacts in one report](https://community.hubspot.com/t5/Dashboards-Reporting/Compare-two-types-of-contacts-in-one-report/m-p/944666/thread-id/9630#M9631)” that you might want to check.  
I also wanted to invite a couple of subject matter experts to this conversation: Hi @DanMYD, [@Mike\_Eastwood](https://community.hubspot.com/t5/user/viewprofilepage/user-id/9259) and [@Shadab\_Khan](https://community.hubspot.com/t5/user/viewprofilepage/user-id/513582) do you have suggestions to help @fiberpunk, please?  
Also, if anybody else has anything to add and/or share, please feel free to join in the conversation 🙂  
Thanks so much and have a fantastic day!  
Best,  
Bérangère

---

<div class="post-metadata">

**Author:** ![fiberpunk](https://avatars.discourse-cdn.com/v4/letter/f/a87d85/32.png) [@fiberpunk](https://community.hubspot.com/u/fiberpunk)\
**Post date:** [October 15, 2024, 11:36am UTC](https://community.hubspot.com/t/datasets-join-contacts-as-secondary-source/118266/3 "2024-10-15T11:36:52Z")

</div>

I appreciate your reply Bérangère 🙏, though the linked thread is not really what I am looking for, as I would really need to join both into one dataset for proper reporting.

---

<div class="post-metadata">

**Author:** ![Shadab\_Khan](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/shadab_khan/32/12293_2.png) [@Shadab\_Khan](https://community.hubspot.com/u/Shadab_Khan)\
**Post date:** [October 17, 2024, 6:45am UTC](https://community.hubspot.com/t/datasets-join-contacts-as-secondary-source/118266/4 "2024-10-17T06:45:01Z")

</div>

Hi @fiberpunk ,

It sounds like you’ve done a great job with your data structuring so far! Here are a few thoughts that might help address your issue:

- **Check for Association Labels** :

- **Why Association Labels Help** :

- **Consider HubSpot Support** :

In my opinion, fixing the associations between contacts should resolve your problem. Once the relationships are properly set up, you’ll have a clearer view of which contacts are referring and which are being referred.

Let me know how it goes, and feel free to share any updates.
