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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Kay_Kalu
Frequent Visitor

Concatenate multiple columns to a single column

I have this CSV file from my Jira extract with multiple coulnms for the comment section. I was hoping to combine them to a single coulmn  so that each comment is on a different line.

Kay_Kalu_0-1751971360112.png

From the will be best to achieve this in power query or with DAX, since all the columns have same name and can vary base on how many comments a particular task has, which means there is no specific number of column and could increase per week as the extract is done weekly. image below is how I wish the comments columns to be for each row

Kay_Kalu_1-1751971879783.png

 

5 REPLIES 5
v-saisrao-msft
Community Support
Community Support

Hi @Kay_Kalu,

We haven’t heard back from you in a while. If your issue has been resolved, Mark the relevant response as the solution to help fellow community members.
If you still need support, let us know if you still need assistance.

 

Thank you.

v-saisrao-msft
Community Support
Community Support

Hi @Kay_Kalu,

checking in to see if your issue has been resolved. If the response provided was helpful, kindly mark the helpful reply as solution so that others with the same issue can benefit.
let us know if you still need assistance.

 

Thank you.

v-saisrao-msft
Community Support
Community Support

Hi @Kay_Kalu,

I hope you had a chance to review the solution shared by @wardy912 @burakkaragoz . If it addressed your question, Consider accepting it as the solution it helps others find answers more quickly.
If you're still facing the issue, feel free to reply, and we’ll be happy to assist further.

 

Thank you.

wardy912
Resolver III
Resolver III

Hi @Kay_Kalu 

 

 Unpivot is the way to go here, in power query, select your 'issue key' column then select 'unpivot other columns'

wardy912_0-1751976767802.png

 

Remove the attribute column as this will just contain the 'comment' column headers.

Also, remove any blanks from the value column.

Next, select 'Group By' in the transform ribbon, group by the 'issue key column and select the operation 'All rows'

wardy912_1-1751976932613.png

 

This will give you a nested table column for your comments.

Now add a custom column as follows

 

Text.Combine([Comments][Value], "#(lf)")

 

This will result in

 

wardy912_2-1751977310092.png

 

Remove the 'comments' column and rename 'custom' to 'comments'

 

wardy912_3-1751977369112.png

 

I hope this helps! Please give a thumbs up and mark as solved if it does, thanks!

burakkaragoz
Community Champion
Community Champion

Hi @Kay_Kalu ,

 

This is a pretty common scenario when dealing with dynamic column structures from tools like Jira. Since the number of comment columns can change over time, Power Query is probably your best bet here — it's more flexible for this kind of transformation.

Here’s a general approach you can try in Power Query:

  1. Load your CSV into Power Query.
  2. Select the columns that contain the comments (you can use a pattern like "Column1", "Column2", etc. if they follow a naming convention).
  3. Use the Unpivot Columns feature — this will turn your multiple comment columns into rows.
  4. Then you can group by the task ID or whatever identifier you have, and optionally add line breaks between comments if needed.

This way, even if the number of comment columns changes next week, the unpivot step will still work as long as you select all comment columns dynamically.

Let me know if you need help with the exact steps or M code!

If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This response was assisted by AI for translation and formatting purposes.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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