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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
chanpreet_90
Frequent Visitor

multiple rows into one row

1.PNG

 

I have a data in this format and I want to combine the rows of Details into one row.

please help me ...I am a beginner...I tried using Text.Combine but still getting error..

 

Thanks in advance  

8 REPLIES 8
KT_Bsmart2gethe
Impactful Individual
Impactful Individual

HI @chanpreet_90 ,

 

Below link has the solution on how to group text:

https://community.powerbi.com/t5/Power-Query/Add-Column-based-on-VLOOKUP-and-CONCATENTATION/m-p/2659...

 

Also, if you need to sum the number, you must ensure the credit sign "cr" is gone. Then, you can apply the text replace function before you use GroupBy. 

 

If you're still struggling, please provide data with sensitive info removed and in a friendly format, and I will get back to you with a step-by-step solution.

 

Regards

KT

Thank you for you response my friend..

I tried your solution but now im getting some 'error' in 'details', 'postdate' and 'valuedate'.
3.PNG

 

I guess the error in details column is coming because it has text and number both.

Please help

 

 

Regards

Hi @chanpreet_90 ,

 

Define the data time before you apply GroupBy. Errors are general cause by a mix of data type. For those errors in the date columns, what are other values recorded under those column apart from date?

 

If you're apply the text.combine function. The column has to be in text format.

 

Regards

KT

4.PNG

Hey...I am able to resolve the issue coming in Details column however still getting Error in date columns. Please check and help

 

Regards

HI @chanpreet_90 ,

 

Are you able to share the code? The provided screenshot is insufficient to tell where the errors are from, apart from the errors that said you attempted to add the date. 

 

Regards

KT

Helloo

 

Here is the code : -

 

let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"PostDate", type date}, {"ValueDate", type date}, {"Details", type text}, {"ChqNo", Int64.Type}, {"Debit", Int64.Type}, {"Credit", Int64.Type}, {"Balance", type number}}),
#"Filled Down" = Table.FillDown(#"Changed Type",{"Balance"}),
#"Grouped Rows" = Table.Group(#"Filled Down", {"Balance"}, {{"PostDate", each List.Sum([PostDate]), type nullable date}, {"ValueDate", each List.Sum([ValueDate]), type nullable date}, {"Details", each Text.Combine([Details], " - "), type nullable text}, {"ChqNo", each List.Sum([ChqNo]), type nullable number}, {"Debit", each List.Sum([Debit]), type nullable number}, {"Credit", each List.Sum([Credit]), type nullable number}})
in
#"Grouped Rows"

Hi @chanpreet_90 ,

 

Delete the red and move them to blue. I won't try to sum date or cheque no.

 

#"Grouped Rows" = Table.Group(#"Filled Down", {"Balance", "PostDate", "ValueDate", "ChqNo"}, {{"PostDate", each List.Sum([PostDate]), type nullable date}, {"ValueDate", each List.Sum([ValueDate]), type nullable date}, {"Details", each Text.Combine([Details], " - "), type nullable text}, {"ChqNo", each List.Sum([ChqNo]), type nullable number}, {"Debit", each List.Sum([Debit]), type nullable number}, {"Credit", each List.Sum([Credit]), type nullable number}})

 

Regards

KT

Hey..

 

5.PNG

 

it worked but in balance column the value is repeating...

 

Regards

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors