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
marcoarib
Frequent Visitor

Ho to combine two columns into one?

I have two columns:

- Authors -
John
Mary
Jane

- Sellers -
John

Mary

Ronald

 

- Final Column -
John
Mary
Jane

Ronald

 

How can I do that on Power BI?

Is it possible to do it with DAX?

 

Thanks.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@marcoarib , Like

new table =distinct(union(all(Table[author]),all(Table[Seller])))

 

this will give a new table.

You can use that.

 

Or use this as dimension and join with both columns (one active, one inactive) . Use userelationship

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

 

Then you can create measure add count from both joins

View solution in original post

4 REPLIES 4
Krutigawale33
Responsive Resident
Responsive Resident

Hello @marcoarib ,

 

Create new Table and paste the DAX:

New Table =
VAR newTable =
UNION (
SUMMARIZE(table1, Table1[- Authors -]),
SUMMARIZE(table2, Table2[ -Sellers-])
)
RETURN
SUMMARIZE(newTable, Table1[- Authors -])
 
That will create final column with name -Authors-

Thank you.

amitchandak
Super User
Super User

@marcoarib , Like

new table =distinct(union(all(Table[author]),all(Table[Seller])))

 

this will give a new table.

You can use that.

 

Or use this as dimension and join with both columns (one active, one inactive) . Use userelationship

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

 

Then you can create measure add count from both joins

It works. Thanks a lot!

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.