cancel
Showing results for
Did you mean:
Highlighted
Frequent Visitor

## Comparing Values from one table to all values in a different table

Hello,

Here is a sample table I have built.  What I have is a two tables with addresses.  I need to compare addresses from table 1 to all the addresses in table 2.  There are no common columns to join tables on.  How do I get my data to appear like the picture below?

Thank you,

Mark

 Table 1 Table 2 Combined Coordinate 1 Coordinate A Coordinate 1 compared to Coordinate A Coordinate 2 Coordinate B Coordinate 1 compared to Coordinate B Coordinate 3 Coordinate C Coordinate 1 compared to Coordinate C Coordinate 2 compared to Coordinate A Coordinate 2 compared to Coordinate B Coordinate 2 compared to Coordinate C Coordinate 3 compared to Coordinate A Coordinate 3 compared to Coordinate B Coordinate 3 compared to Coordinate C
1 ACCEPTED SOLUTION

Accepted Solutions
Memorable Member

## Re: Comparing Values from one table to all values in a different table

Try the Dax function CrossJoin

https://docs.microsoft.com/en-us/dax/crossjoin-function-dax

``CrossJoin = (CROSSJOIN('Table 1','Table 2'))``

You can they add a calculated column to check the values. This can be used to filter just the matches

``Check = IF('CrossJoin'[Address1Data]='CrossJoin'[Address2Data], "Match", "No Match")``

3 REPLIES 3
Memorable Member

## Re: Comparing Values from one table to all values in a different table

Try the Dax function CrossJoin

https://docs.microsoft.com/en-us/dax/crossjoin-function-dax

``CrossJoin = (CROSSJOIN('Table 1','Table 2'))``

You can they add a calculated column to check the values. This can be used to filter just the matches

``Check = IF('CrossJoin'[Address1Data]='CrossJoin'[Address2Data], "Match", "No Match")``

Frequent Visitor

## Re: Comparing Values from one table to all values in a different table

Thank you for the quick reply.  This appears to be exactly what I am looking for.  I will give this a try when I get into the office tomrrow.

Super User IV

## Re: Comparing Values from one table to all values in a different table

You can bring data from one table to another like the example given below

``````New column in Table 1 = maxx(filter(table2,table1[customer] = table2[customer] && table2[option]="ABC",table2[value])

New column in Table 1 = maxx(filter(table2,table1[Attribute] = table2[name] && table1[project] = table2[project]),table2[name])
``````

You can refer to how I have taken date diff across two tables in 4 ways.

https://www.dropbox.com/s/y47ah38sr157l7t/Order_delivery_date_diff.pbix?dl=0

Can you share sample data and sample output? If possible please share a sample pbix file after removing sensitive information. Thanks.
Proud to be a Datanaut My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

In case it does not help, please provide additional information and mark me with @
My Recent Blogs -Decoding Direct Query - Time Intelligence, Winner Coloring on MAP,
HR Analytics, Power BI Working with Non-Standard TimeAnd Comparing Data Across Date Ranges
Proud to be a Super User! Linkedin

Announcements

#### New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

#### ‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

#### Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Top Solution Authors
Top Kudoed Authors