Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
jonclay
Helper IV
Helper IV

Creating field in table 1 showing Yes or No depending on whether it exists in table 2

Hi everyone

I have two tables in my CRM, one called Contact and the other called CP.  These are related on the contactid field using a Many to Many relationship with a Single Cross-filter direction.

The CP table contains a field called preferencesname which can contain one or many values (e.g. or B or C etc).

I want to create fields in the Contact table which basically say "... if the CP table contains value A for a specific contactid then put Yes otherwise No". I would then do the same for value B, value C and so on, all in separate fields.

So, I want to end up with something like this for each contactid:

contactidNameValue AValue BValue CValue D
12345JonYesNoNoYes


What would be the best way to acheive this please?

Many thanks
Jon

1 ACCEPTED SOLUTION
aduguid
Super User
Super User

I'd do this in power query and pivot the column, preferencesname.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @jonclay ,

 

Since you did mention many-to-many relationships, can you provide sample data as well as expected results?

 

Best regards,
Community Support Team_ Scott Chang

aduguid
Super User
Super User

I'd do this in power query and pivot the column, preferencesname.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.