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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Upali63
Helper II
Helper II

Add new column to a table based on column in another table

Hi Friends

 I have following two tables in my project . 

 

Upali63_0-1676476000413.png

Now I want to check if CODE in Table 1 exists in Table 2 and If true a new column should be added to table 1 marked as 'Y' and if false new column should be marked as 'N'. Required output table is shown below. Kindly help to solve the issue.

 

Upali63_1-1676476233666.png

 

2 REPLIES 2
YukiK
Impactful Individual
Impactful Individual

Assumming you have a relationship between the two on CODE. You should be able to do something like this:

FLAG calculated column = 
IF (
    Table1[CODE] = RELATED( TABLE2[CODE] ),
    "Y",
    "N",
)
 

Thnaks,

It is not working my friend

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors