Forum Discussion

Niraj_vora0106's avatar
Niraj_vora0106
Icon for Helper III rankHelper III
4 years ago
Solved

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 wa...
  • v-jingzhang's avatar
    4 years ago

    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])

     

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