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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. 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

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

Hello,

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

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Power BI Header Change

Power BI Header Update

Read about the exciting updates for the Power BI forum.