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
Anonymous
Not applicable

New column based on another table content

Hi-

Problem

I have two tables, table 1 is the main 'master table' and table 2 is an update table.

Essetially data is recorded in table 2 as a change log and tracks updates made in the first table.

Table 1

AR1989_0-1665968398525.png

Table 2

AR1989_1-1665968419395.png

Solution

What I would like to be able to do is create a new column on table 1 that gives a true value if the Risk ID in table one is in Table 2.

This has to be an additional column to the table.

so something like 

R01TRUE
R02FALSE
R03FALSE
R04FALSE
R05FALSE
  
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , A new column in Table 1

 

New column =

var _cnt = countx(filter(Table2, Table2[ID] = Table1[ID]), Table1[ID])

return

if(isblank(_cnt), "Yes", "No")

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , A new column in Table 1

 

New column =

var _cnt = countx(filter(Table2, Table2[ID] = Table1[ID]), Table1[ID])

return

if(isblank(_cnt), "Yes", "No")

Anonymous
Not applicable

Thanks that works really well.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.