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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Matching Values

I am new to Power BI and this should be a simple task but I can't get it to work

 

Table 1 contains a column "Location ID" (an 8 digit number) 

 

Table 2 contains a column "Site" (an 8 digit number) 

 

I need a calculation that shows if "Location ID" = "Site" return "True"

1 ACCEPTED SOLUTION

@Anonymous Well, add a column to Table 1 or Table 2 like below.

Flag = IF(Table1[Location ID] IN VALUES(Table2[Site]),"True","False")

020907.jpg

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

@Anonymous ,

New column in table 1

if(isblank(countx(filter(Table2,table1[Location ID] = table2[Site]),table2[Site])), false(), true())

 

new column in table 2

if(isblank(countx(filter(Table1,table1[Location ID] = table2[Site]),table1[Location ID] )), false(), true())

Share with Power BI Enthusiasts: 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 for a quick answer 

 

Unfortunately, I am not sure how this helps 

 

Let me explain further,

 

The company has two databases

 

One is from SAP and is thought of as the "Source of Truth" and the other is a Support DataBase where the updates have been put in manually (many mistakes:()

 

In the SAP Db, the column is called "Site" and in the support Db, the column is called "Location ID" both should match for a given location BUT they don't, see below. Only one record matches the ID number but the address is wrong

Capture.JPG

 

Maybe i am going about this the wrong way 😞

@Anonymous 

Sorry I don't quite understand your expected result. Can you expain it with some sample data? For example, in your screenshot, only 51627783 appears in both tables, should it be "True"? And for other IDs, should they all be "False"? Does an ID number appear in a table only once (not duplicate)? In which table do you hope to add a new column to show the result or you want a measure to calculate the result?

Regards,
Jing

Anonymous
Not applicable

Hi Jing

 

Thank you for your reply

 

The result should not be duplicated in the table and I just want a calculation IF xxx is in Both tables "True" if Unique to a table "False"

@Anonymous Well, add a column to Table 1 or Table 2 like below.

Flag = IF(Table1[Location ID] IN VALUES(Table2[Site]),"True","False")

020907.jpg

Anonymous
Not applicable

Thank you 🙂 

 

I can know complete analysis 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.