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
Bhaskarkolli9
Frequent Visitor

Concatenation of rows for column

Hi All,

 

I am trying to create column based on available column.

Such as TDLINE ,TDNAME,Test desire result as below.

Requesting any posiblitities in M query please help.

Thanks in advance.

Bhaskarkolli9_0-1700740422444.png

 

1 ACCEPTED SOLUTION
jpessoa8
Continued Contributor
Continued Contributor

Hello @Bhaskarkolli9,

 

This is possibile in PowerQuery by doing some adjustments inside a GroupBy option.

Grouping the information by TDNAME you can add a new Column using the Text.Combine function like : 

 

Table.Group(Source, {"TDNAME"}, {{"Desire Result", each Text.Combine([TDLINE],","), type nullable text}, {"All", each _, type table [TDNAME=nullable text, TDLINE=nullable text, Test=nullable text]}})

 

jpessoa8_0-1700743802160.png

 

You can get in this link a PowerBI file with an example : https://we.tl/t-emzQC0kXFv

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudo 👍
Thanks!

You can also check out my LinkedIn!

Best regards,
Jorge Pessoa

View solution in original post

3 REPLIES 3
jpessoa8
Continued Contributor
Continued Contributor

Hello @Bhaskarkolli9,

 

This is possibile in PowerQuery by doing some adjustments inside a GroupBy option.

Grouping the information by TDNAME you can add a new Column using the Text.Combine function like : 

 

Table.Group(Source, {"TDNAME"}, {{"Desire Result", each Text.Combine([TDLINE],","), type nullable text}, {"All", each _, type table [TDNAME=nullable text, TDLINE=nullable text, Test=nullable text]}})

 

jpessoa8_0-1700743802160.png

 

You can get in this link a PowerBI file with an example : https://we.tl/t-emzQC0kXFv

 

Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudo 👍
Thanks!

You can also check out my LinkedIn!

Best regards,
Jorge Pessoa

Thanks for your responce.

 

We still facing the issue like coulmn was not find, but we have column available in table.

Bhaskarkolli9_0-1700811080846.png

Bhaskarkolli9_1-1700811142606.png

 

 

 

Hi @Bhaskarkolli9,

 

In the Table.Group function you're providing, you are not referencing the previous step (Added Items1), but the "Source" step (as you can see in the picture bellow):

 

jpessoa8_0-1700815038496.png

 

Instead you should have this :

 

 

Table.Group(#"Added Items1", {"TDNAME"}, {{"Desire Result", each Text.Combine([TDLINE],","), type nullable text}, {"All", each _, type table [TDNAME=nullable text, TDLINE=nullable text, Test=nullable text]}})

 

 

For additional help, please @ me in your reply!

You can also check out my LinkedIn!

Best regards,
Jorge Pessoa

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.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

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.

Top Solution Authors
Top Kudoed Authors