Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

CONCATENATE DAX function not recognized in Custom Column Window

I'm trying to merge the contents of two columns (text) in Transform Data Table with a new Custom Column but Custom Column window doesn't recognize CONCATENATE function and the formula produces error.

 

How could I merge the contents and why some functions are not recognized?

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

    Microsoft Power BI supports two different languages, M language(in Power Query) and DAX .

    CONCATENATE() function is used for DAX not for M.

     

    So if you could use the following to get the same effect:

        #"Grouped Rows" = Table.Group( #"Changed Type" , {"Cate"}, {{"Custom", each Text.Combine([Value], "/"), type text}})

     

    Table 2 =
    ADDCOLUMNS (
        VALUES ( 'Table (2)'[Cate] ),
        "Product",
            CALCULATE (
                CONCATENATEX ( VALUES ( 'Table (2)'[Value] ), 'Table (2)'[Value], "/ " )
            )
    )

    My final output looks like this:

    Here is the pbix file.

     

    Did I answer your question ? Please mark my reply as solution. Thank you very much.
    If not, please upload some insensitive data samples and expected output.

     

    Best Regards,
    Eyelyn Qin

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    I did it with Merge Columns in Toolbar.

  • Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Microsoft Power BI supports two different languages, M language(in Power Query) and DAX .

    CONCATENATE() function is used for DAX not for M.

     

    So if you could use the following to get the same effect:

        #"Grouped Rows" = Table.Group( #"Changed Type" , {"Cate"}, {{"Custom", each Text.Combine([Value], "/"), type text}})

     

    Table 2 =
    ADDCOLUMNS (
        VALUES ( 'Table (2)'[Cate] ),
        "Product",
            CALCULATE (
                CONCATENATEX ( VALUES ( 'Table (2)'[Value] ), 'Table (2)'[Value], "/ " )
            )
    )

    My final output looks like this:

    Here is the pbix file.

     

    Did I answer your question ? Please mark my reply as solution. Thank you very much.
    If not, please upload some insensitive data samples and expected output.

     

    Best Regards,
    Eyelyn Qin

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

     

    Best Regards,
    Eyelyn Qin