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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Niraj_vora0106
Helper III
Helper III

Concatenation in M-query

Hi community,

 

How to Concatenate in M-query.?

I tried using Merge feature.

Tried using "&" too but didn't work!

 

I've three columns that I want to concat,

Day/Month/Year

 

Is there any way on how to do it using M-query functions?

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Niraj_vora0106 

 

To concatenate multiple values with "&", you need to ensure every value is of Text type. You can change all column types to Text before concatenating. Or if you want to keep their original non-Text type, you can use Text.From() function to convert column type temporarily when concatenating. 

 

In the following example, Day and Year columns are of Whole number type. 

Text.From([Day]) & "/" & [Month] & "/" & Text.From([Year])

vjingzhang_0-1646187352195.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @Niraj_vora0106 

 

To concatenate multiple values with "&", you need to ensure every value is of Text type. You can change all column types to Text before concatenating. Or if you want to keep their original non-Text type, you can use Text.From() function to convert column type temporarily when concatenating. 

 

In the following example, Day and Year columns are of Whole number type. 

Text.From([Day]) & "/" & [Month] & "/" & Text.From([Year])

vjingzhang_0-1646187352195.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Hi @v-jingzhang 

 

The formula that you suggested worked really well.

Thank you.

VijayP
Super User
Super User

@Niraj_vora0106 
You can use Text.Combine({ first text, second Text,....}) and if you are combining any number keep that in " " for example "2" or "1" etc., and it works




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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