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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.