web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
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

I have the same question (0)
  • Suggested answer
    Karl Maybach Profile Picture
    on at

    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
    25,210 on at

    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
    75 on at

    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
    25,210 on at

    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
    on at

    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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Pallavi Phade Profile Picture

Pallavi Phade 94

#2
Tom_Gioielli Profile Picture

Tom_Gioielli 69 Super User 2025 Season 2

#3
TAHER Mehdi Profile Picture

TAHER Mehdi 58

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans