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
Syndicate_Admin
Administrator
Administrator

Join 3 column data into 1 column only with DAX in Power BI - Direct Query connection

In the table I am working on three columns, the first three are zip codes. I want to combine all of them in one column with all Zip Codes. Union DAX syntax doesn't work for me (everything is in the same table). I can only work with DAX because I have the connection to the model by Direct Query (therefore I cannot use Power Query)

Thanks!

sirjabo_0-1622251771505.png

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi, @Syndicate_Admin 

please check the below.

 

Picture1.png

 

New Table =
UNION (
VALUES ( 'Table'[Zip1] ),
VALUES ( 'Table'[Zip2] ),
VALUES ( 'Table'[Zip3] )
)

 

https://www.dropbox.com/s/231t1f44qm8nqtw/admin.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

2 REPLIES 2
v-robertq-msft
Community Support
Community Support

Hi, @Syndicate_Admin 

Have Jihwan_Kim’s reply helped you to find the solution to this problem? Because the UNION() function is the only method to combine columns in DAX.

More info about the UNION() function in DAX

 

If so, would you like to mark your own reply as a solution so that others can learn from it too?

Thanks in advance!

 

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

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

Jihwan_Kim
Super User
Super User

Hi, @Syndicate_Admin 

please check the below.

 

Picture1.png

 

New Table =
UNION (
VALUES ( 'Table'[Zip1] ),
VALUES ( 'Table'[Zip2] ),
VALUES ( 'Table'[Zip3] )
)

 

https://www.dropbox.com/s/231t1f44qm8nqtw/admin.pbix?dl=0 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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.