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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
aashton
Helper V
Helper V

Union tables when one column only exists in one of the tables

 How do you go about union-ing tables together when you want to include a column that only exists in one of the tables?  For example, I want to include the ID, Name and Phone from each table (there are many more fields I am not picking so I am using SUMMARIZE), and email which only exists in Table C.

 

TAble A

ID, Name, Phone

TAble B

ID, Name, Phone

Table C

ID, Name, Phone, Email

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

Hi @aashton ,

According to your description, here's my solution.

Sample:

TableA:

vyanjiangmsft_0-1691551047938.png

TableB:

vyanjiangmsft_1-1691551070358.png

TableC:

vyanjiangmsft_2-1691551090326.png

Create a new table:

Table =
UNION (
    SELECTCOLUMNS (
        'TableA',
        "ID", 'TableA'[ID],
        "Name", 'TableA'[Name],
        "Phone", 'TableA'[Phone],
        "Email", BLANK ()
    ),
    SELECTCOLUMNS (
        'TableB',
        "ID", 'TableB'[ID],
        "Name", 'TableB'[Name],
        "Phone", 'TableB'[Phone],
        "Email", BLANK ()
    ),
    SELECTCOLUMNS (
        'TableC',
        "ID", 'TableC'[ID],
        "Name", 'TableC'[Name],
        "Phone", 'TableC'[Phone],
        "Email", 'TableC'[Email]
    )
)

Get the correct result:

vyanjiangmsft_3-1691551158791.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @aashton ,

According to your description, here's my solution.

Sample:

TableA:

vyanjiangmsft_0-1691551047938.png

TableB:

vyanjiangmsft_1-1691551070358.png

TableC:

vyanjiangmsft_2-1691551090326.png

Create a new table:

Table =
UNION (
    SELECTCOLUMNS (
        'TableA',
        "ID", 'TableA'[ID],
        "Name", 'TableA'[Name],
        "Phone", 'TableA'[Phone],
        "Email", BLANK ()
    ),
    SELECTCOLUMNS (
        'TableB',
        "ID", 'TableB'[ID],
        "Name", 'TableB'[Name],
        "Phone", 'TableB'[Phone],
        "Email", BLANK ()
    ),
    SELECTCOLUMNS (
        'TableC',
        "ID", 'TableC'[ID],
        "Name", 'TableC'[Name],
        "Phone", 'TableC'[Phone],
        "Email", 'TableC'[Email]
    )
)

Get the correct result:

vyanjiangmsft_3-1691551158791.png

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Idrissshatila
Super User
Super User

Hello @aashton ,

 

you could append all these tables in Power query and the email values will show only for the values in table C while the others will show null.

https://zebrabi.com/advanced-guide/how-to-append-data-in-power-bi/

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

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

February Power BI Update Carousel

Power BI Monthly Update - February 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.