Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello, I'm a new Power BI user and need some assistance in merging columns.
This is the excel data input:
I want to create a matrix in Power BI that takes the names from both columns A and B, like this:
Solved! Go to Solution.
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”:
This is the DAX formula:
Table =
UNION (
SUMMARIZE ( Sheet1, Sheet1[Column 1] ),
SUMMARIZE ( Sheet1, Sheet1[Column 2] )
)
This is the Return:
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.
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”:
This is the DAX formula:
Table =
UNION (
SUMMARIZE ( Sheet1, Sheet1[Column 1] ),
SUMMARIZE ( Sheet1, Sheet1[Column 2] )
)
This is the Return:
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.
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:
Then I go back to the Report view and hit the New measure button.
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.
I then click on Matrix
I then try to drag and drop the measure I created. However it wont let drop in it either Rows or Columns.
If I drop in the Values field, I get the following error:
HI, @Anonymous
The formula that I provided is only available for creating Calculate Tables.
Thanks! This works.
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
@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.
User | Count |
---|---|
93 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |