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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
kampyy
Frequent Visitor

Dax Expression to concatenate and group by

IDSub IDSub Level 
11level 3
12level 2
23level 3
34level 3
35level 1
46level 3
57level 2
68level 2



Looking for DAX Expression to - create a comma separate column of "Sub Level" group by "ID"

For EX.

IDSub IDSub Level New Column
11level 3level 3, Level 2 
12level 2level 3, Level 2 
23level 3level 3
34level 3level 3, Level 1
35level 1level 3, Level 1
46level 3level 3
57level 2level 2
68level 2level 2



Thanks in Advance

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@kampyy , A new column

 

concatenatex(Filter(Table, [ID] = earlier([ID]) ) , [Sub Level] )

 

Concatenate Text- Measure, DAX Table, and Power Query Table: https://youtu.be/xAh3tz1qo24

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

v-cgao-msft
Community Support
Community Support

Hi @kampyy ,

Made some edits, added separator parameter (",").

Column = CONCATENATEX(FILTER('Table','Table'[ID]=EARLIER('Table'[ID])),'Table'[Sub Level],",")

vcgaomsft_0-1664271225883.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

3 REPLIES 3
v-cgao-msft
Community Support
Community Support

Hi @kampyy ,

Made some edits, added separator parameter (",").

Column = CONCATENATEX(FILTER('Table','Table'[ID]=EARLIER('Table'[ID])),'Table'[Sub Level],",")

vcgaomsft_0-1664271225883.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

amitchandak
Super User
Super User

@kampyy , A new column

 

concatenatex(Filter(Table, [ID] = earlier([ID]) ) , [Sub Level] )

 

Concatenate Text- Measure, DAX Table, and Power Query Table: https://youtu.be/xAh3tz1qo24

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hello,

Is it possible to make your formula dynamic in a measure?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.