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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
BIuser45
Frequent Visitor

How do I use DAX to append two columns from two different tables?

I have column A from Table A and column B from Table B. Both columns have the column header called, Categories. How do I use DAX to append both columns? 

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

You should ideally do this in the Query Editor.  Use the Append tables feature there and remove columns other than the Category column.  Remove duplicates from the Category column.  Then create relationships (Many to One and Single) from the 2 tables to the single column appended table.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
parry2k
Super User
Super User

@BIuser45 you can use UNION function:

 

Table C = UNION ( VALUES ( TableA[Category] ), VALUES ( TableB[Category] ) )

 

👉 Learn Power BI and Fabric - subscribe to our YT channel - @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤️



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

I tired it, but I found I can't due that DAX field or table C for the legend of a donut chart or the row of a matrix. Is there a way to make table C as a field that could used as a legend, row or column of a chart?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.