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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
jimpatel
Helper V
Helper V

Compare if same number repeating in different table

Hi

 

I am really struggling with following logic. Any help will be appreciated.

 

I have 2 tables and i cant link those two tables for some reason. I am trying to look like something like Vlookup formula. 

 

Table1 : Column A have multiple part numbers (some of them will be repeating)

Table2: Column C have multiple part number (Some of them will be repeating)

 

What i am after is, any measure or column formula to find if Table 2 (Column C) part number in Table1(Column A), if yes then "yes" else "no"

 

Any idea please?

1 ACCEPTED SOLUTION

Hi @jimpatel ,

You can create a calculated column as below in Table2 to get it:

 

Column =
CALCULATE (
    MAX ( 'Table1'[D] ),
    FILTER ( 'Table1', 'Table1'[A] = 'Table2'[C] )
)

 

If the above one can't help you get the desired result, please provide some sample data in Table1 and Table2 (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

4 REPLIES 4
jimpatel
Helper V
Helper V

Sorry,

 

Its working perfectly fine. Thanks a lot. 

Just one question, how to change this formula to reflect other column. That is instead of "YES", i wanted to show text in column D in table 1 please.

 

Any idea? 

thanks again 🙂

Hi @jimpatel ,

You can create a calculated column as below in Table2 to get it:

 

Column =
CALCULATE (
    MAX ( 'Table1'[D] ),
    FILTER ( 'Table1', 'Table1'[A] = 'Table2'[C] )
)

 

If the above one can't help you get the desired result, please provide some sample data in Table1 and Table2 (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

jimpatel
Helper V
Helper V

Thanks a lot for your help. I am getting error in "table1[Column A]), Table1[Column A])" . Any idea pleasE?

Thanks a lot

amitchandak
Super User
Super User

@jimpatel , New column in Table 2

 

new column =

var _cnt = countx(filter(Table1, Table2[Column C] = Table1[Column A]), Table1[Column A]) 

return

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

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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