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

Create new table/column showing same type values of two different tables

Hi Team,

 

i am fairly new to PowerBi and here we go my first question. 

I have two tables containing the same type of information. I want to create a new column showing the available data of these two columns.

 

Example

 

Table1 Column1

100
101

102

109

 

Table2 Column2

100

103

110

 

New Column:

100

101

102

103

109

110

 

I quite sure it must be an easy one.....just can't see the foresat because of too many trees.

 

Thanks in advance!

Pascal

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

According to my understanding, you want to combine two columns from two different tables, right?

 

You could use the following formula to calculate a new table:

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

My visualization looks like this:

8.25.1.1.png

Is the result what you want? If you have any questions, please upload some data samples and expected output.

Please do mask sensitive data before uploading.

 

Best Regards,

Eyelyn Qin

 

View solution in original post

4 REPLIES 4
v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

Did I answer your question? Please mark my reply as solution, thank you~

 

Best Regards,

Eyelyn Qin

v-eqin-msft
Community Support
Community Support

Hi @Anonymous ,

According to my understanding, you want to combine two columns from two different tables, right?

 

You could use the following formula to calculate a new table:

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

My visualization looks like this:

8.25.1.1.png

Is the result what you want? If you have any questions, please upload some data samples and expected output.

Please do mask sensitive data before uploading.

 

Best Regards,

Eyelyn Qin

 

amitchandak
Super User
Super User

@Anonymous , You can create a new table like

new table = distinct(union(all(Table1[column1]),all(Table2[column2])))

 

Also find the link of the file, where similar stuff was done

https://www.dropbox.com/s/op9lb78w9utdonz/Distinct%20from%20two%20Tables.pbix?dl=0

Greg_Deckler
Super User
Super User

@Anonymous - I'm not sure about a new column, a new table, definitely:

 

New Table = 
DISTINCT(
  UNION(
    SELECTCOLUMNS('Table1',"New Column",[Column1]),
    SELECTCOLUMNS('Table2',"New Column",[Column2]),
  )
)

  


@ 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.

Top Solution Authors