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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Compare 2 column to one

Hello!

I'm try to understand how can i make from 2 colums in different tables a new table with all distinct data from 2 column?

 

Now i'm thy to make a directory for addresses that are referenced by 2 caves. Naturally, I wanted to load different values. I tried to use variables, but only for one field.

If anyone becomes more intelligible, then I would like to perform the same function as
in Qlik:

concatinate(Table)

load

distinct

...

But i'm cant understend how do that....

 

Best regards, Anton

 

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

So this is a wild guess because I only caught about half of that. So, first the new Composite model feature supports many-to-many relationships. It's in preview but that is one option. But, if you need a table of DISTINCT values in order to bridge the two tables, you could do this:

 

Table = DISTINCT('Table'[Column])

Now, if you need a table that has all of the distinct values from both tables, then:

 

Table = DISTINCT(UNION(VALUES(Table1[Column1]),VALUES(Table2[Column1])))

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hello!

It ok, all work. But the names table not in english most have a single quotes for its work...

v-frfei-msft
Community Support
Community Support

Hi @Anonymous,

 

One sample for your reference. We can new a calculated table using the formula.

 

 

Table = DISTINCT(UNION(VALUES(Table1[name1]),VALUES(Table2[name2])))

 

Capture.PNG

 

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
Greg_Deckler
Super User
Super User

So this is a wild guess because I only caught about half of that. So, first the new Composite model feature supports many-to-many relationships. It's in preview but that is one option. But, if you need a table of DISTINCT values in order to bridge the two tables, you could do this:

 

Table = DISTINCT('Table'[Column])

Now, if you need a table that has all of the distinct values from both tables, then:

 

Table = DISTINCT(UNION(VALUES(Table1[Column1]),VALUES(Table2[Column1])))

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.