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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Anonymous
Not applicable

Finding out if numeric values of one column are present in another numeric column of another table

I have two tables, and both have a column "work item id". I need to find out how many of the id´s of column from table 1, are also present in table 2 (specifically to find which are absent), and I need this result in a calculated column.

 

Table 1 has around 500 numeric entries in the column "work item id", while table 2 has about 460 numeric entries in the column "work item id". I need a calculated column to find out which entries are not present in "work item id" table 2, but are present in "work item id" table 1.

 

I need an urgent DAX solution to create the calculated column, please help.

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]), Table2[ID])

return

if(isblank(_cnt), 0,1 )

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi,
I think this should be a way to solve it:
Matching_Column =
var x_1 = SELECTEDVALUE('Table 1'[work item id])

var x_2 = SELECTEDVALUE('Table 2'[work item id])

return

IF(x_1 = x_2, "Present","Not Present")

I hope that helps 🙂

 

Anonymous
Not applicable

No, every value comes as "Present". 

amitchandak
Super User
Super User

@Anonymous , A new column in table 1

 

new column =

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

return

if(isblank(_cnt), 0,1 )

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thank you so much!! Worked like a charm! Can you (in short) explain the code you wrote? As I am new to this, I would learn that way. SO many Thanks

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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