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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It 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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.