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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Bebs
Helper II
Helper II

How to concatenate n values in a matrix table ?

Hi,

In a matrix table, I want to display every distinct value of a string column. 

How can I do IT ?

(I'm looking for some sort of concatenate agg function but it doesn't seems to exist (CONCATENATE function only works for 2 values, not n values).

 

Thanks

 

Regards

 

 

2 ACCEPTED SOLUTIONS
JamesFR06
Resolver IV
Resolver IV

 HI,

You have to use concatenatex. If you want some help, give me a pic of your table

View solution in original post

Anonymous
Not applicable

Hi @Bebs ,
@JamesFR06  suggested that you provide some data but did not receive a response so I created a sample data to address your question:
Sample data:

vyifanwmsft_2-1710489247690.png

 

1.Add a column.

Distinct ID = 
VAR _1 =
    CONCATENATEX ( DISTINCT ( 'Table'[ID] ), 'Table'[ID], ", " )
VAR _2 =
    CONCATENATEX ( DISTINCT ( 'Table'[Name] ), 'Table'[Name], ", " )
VAR _3 =
    CONCATENATEX ( DISTINCT ( 'Table'[Category] ), 'Table'[Category], ", " )
RETURN
    _1 & " | " & _2 & " | " & _3

 

Final output:

vyifanwmsft_3-1710489376226.png

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

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

View solution in original post

3 REPLIES 3
Bebs
Helper II
Helper II

Thanks a lot, it's perfect 👍

Anonymous
Not applicable

Hi @Bebs ,
@JamesFR06  suggested that you provide some data but did not receive a response so I created a sample data to address your question:
Sample data:

vyifanwmsft_2-1710489247690.png

 

1.Add a column.

Distinct ID = 
VAR _1 =
    CONCATENATEX ( DISTINCT ( 'Table'[ID] ), 'Table'[ID], ", " )
VAR _2 =
    CONCATENATEX ( DISTINCT ( 'Table'[Name] ), 'Table'[Name], ", " )
VAR _3 =
    CONCATENATEX ( DISTINCT ( 'Table'[Category] ), 'Table'[Category], ", " )
RETURN
    _1 & " | " & _2 & " | " & _3

 

Final output:

vyifanwmsft_3-1710489376226.png

How to Get Your Question Answered Quickly - Microsoft Fabric Community

If it does not help, please provide more details with your desired out put and pbix file without privacy information.

 

Best Regards,

Ada Wang

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

JamesFR06
Resolver IV
Resolver IV

 HI,

You have to use concatenatex. If you want some help, give me a pic of your table

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.