Skip to main content

Notifications

Customer experience | Sales, Customer Insights,...
Suggested answer

Segment is not working when using the same bloc

(0) ShareShare
ReportReport
Posted on by 75

I created a segment from different entity that has relation with Contact using different bloc (Union) and it works. I tried to create the same query in teh same bloc and it doesn't work (members don't show). Please see attached file. The first Screenshot is the one that doesn't work.

Is there any rule that I may have missing? 

Thank you very much for your help. 

SC-1.png

SC-2.png

  • Suggested answer
    Karl Maybach Profile Picture
    Karl Maybach on at
    RE: Segment is not working when using the same bloc

    Nima31, I think you're asking why your two segments don't produce the same results. The queries are not logically equivalent--the one using UNION should typically produce many more results. I'd have to test it, but I think using INTERSECT instead of UNION would make the two queries the same.

  • cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: Segment is not working when using the same bloc

    Hi Nima31,

    Could you share detail of "the one with union is not showing the same number of contacts" means?

    -> Do you mean there is one segment that hasn't estimated result as you checked by advanced find?

    -> Do you mean you can get right number of contacts with "Contact (Contact -> Account (Company Name))" relationship but the final estimated result is not right when you union another segment as you screenshot?

    (While number of each segment is right)

    Because Union just combines all members of the two groups, so you could check whether there is one of segment hasn't right number.

    Please check both your segment query filters and advanced find filters, and share screenshot of them if possible to let us review whether anything is not correct.

    In addition, you could try other query block operators to meet your requirements:

    https://docs.microsoft.com/en-us/dynamics365/marketing/segments-profile#combine-multiple-query-blocks

    pastedimage1573726551230v1.png

    Regards,

    Clofly

  • Nima31 Profile Picture
    Nima31 75 on at
    RE: Segment is not working when using the same bloc

    Hello,

    Thank you very much for your help. It works and it shows the right number of contacts (I checked with advanced find). However, the one with union is not showing the same number of contacts.

    Since we can user either the same bloc or union, what should I put the Query ( with union) to get the same result please?

    Thank you!

  • Suggested answer
    cloflyMao Profile Picture
    cloflyMao 25,202 on at
    RE: Segment is not working when using the same bloc

    Hi Nima31,

    As Karl suggested with his explanation, the reason would be relationship Contact -> Account (Account), 

    while Contact -> Account (Company Name) is actually what you need.

    You could find detailed description of relationship definition in segment via link below:

    https://docs.microsoft.com/en-us/dynamics365/marketing/segments-profile#move-between-entities-with-relationships

    7120.png

    Contact -> Account (Company Name) will query all contacts by specifying their parent account(Company Name) value,

    (account is starting side, Company Name is a lookup field for contact entity, Contact -> Account is N:1)

    so your requirement could be met and your doubt could be solved by what doc has described and Karl's explanation.

    The one thing that may confuse us would be that why Contact -> Account (Account) relationship exists in OOB drop down list, while I didn't find Account field in account entity.

    Regards,

    Clofly

  • Suggested answer
    Karl Maybach Profile Picture
    Karl Maybach on at
    RE: Segment is not working when using the same bloc

    I think you might be using the wrong relation. Try using Contact -> Account (Company Name) instead of Contact -> Account (Account) for both of your segments. I suspect the bottom group from your "working" segment is also not finding any contacts, but the segment still shows results because you are using UNION and the top group is finding at least some contacts.

    The  Contact -> Account (Company Name) relationship tells you that the relation between the Account entity and the Contact entity goes through the Company Name field of the Contact entity. The Company Name field holds the name of the company (account) that each contact works for, so this query will find employees of the accounts you have defined. If you are actually looking for the primary contact for each account (as defined on the account record), then use Account -> Contact (Primary Contact).

    I'm not sure what Contact -> Account (Account) is for. For me, it never finds anything.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,969 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 230,842 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans