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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Create a custom column

Hello, I'm a new Power BI user and need some assistance in merging columns.


This is the excel data input:

PowerBI_Input.png

 

I want to create a matrix in Power BI that takes the names from both columns A and B, like this:

PowerBI_Output.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

Based on your description, I suggest you to use DAX Union function to create a calculated table. See Below:

This is the imported Excel Table named “Sheet1”:

1.jpg

This is the DAX formula:

 

Table =
UNION (
    SUMMARIZE ( Sheet1, Sheet1[Column 1] ),
    SUMMARIZE ( Sheet1, Sheet1[Column 2] )
)

 

This is the Return:

2.png

 

Best Regards,

Paul Zheng

 

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

6 REPLIES 6
Anonymous
Not applicable

Hi @Anonymous ,

 

Based on your description, I suggest you to use DAX Union function to create a calculated table. See Below:

This is the imported Excel Table named “Sheet1”:

1.jpg

This is the DAX formula:

 

Table =
UNION (
    SUMMARIZE ( Sheet1, Sheet1[Column 1] ),
    SUMMARIZE ( Sheet1, Sheet1[Column 2] )
)

 

This is the Return:

2.png

 

Best Regards,

Paul Zheng

 

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

Anonymous
Not applicable

Hello, thanks for your help, this is the results i'm looking for. However is still can't get it to work.

I've created a table that exactly matches your example. I will try to explain it step by step.

This is how it looks in the Data view:
1 - Data View.png

 

Then I go back to the Report view and hit the New measure button.
2 - new measure.png

 

I type in the formula you send me. At first I was getting a syntax error but I think that was due to a regional setting, it seems like I need to use semi-colon instead of comma.
3 - Dax formula.png

 

I then click on Matrix
4 - new matrix.png

 

I then try to drag and drop the measure I created. However it wont let drop in it either Rows or Columns. 5 - Drag and drop.png

If I drop in the Values field, I get the following error:

6 - error.png

Anonymous
Not applicable

HI, @Anonymous 

 

The formula that I provided is only available for creating Calculate Tables.

3.PNG

Anonymous
Not applicable

Thanks! This works.

amitchandak
Super User
Super User

Try union and Summarize

 

Sheet = union(SUMMARIZE(Sales,Sales[Brand]),SUMMARIZE(Sales,Sales[Brand1]))

 

The information you have provided is not making the problem clear to me. Can you please explain with an example. If possible please share a sample pbix file after removing sensitive information.
Thanks

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
parry2k
Super User
Super User

@Anonymous you can add new column in your table and concatenate your columns

 

Name A and B = 
Table[Column A] & " " & Table[Column B]

 

Hope this is what you are looking for.



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.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors