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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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