Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
Hi good day, is it possible in PQ or Summurized table to combine the value in my column into row something like this
OUTPUT
| Location | Task |
| shfh-y0998 | 12345trtr |
| gfhdgh-354y | 12345trtr |
| 45-dgfd | 565656kjhjhkh |
| fdhdh098-5 | 565656kjhjhkh |
| hdfhtrh-453 | 565656kjhjhkh |
| yuryt7865 | tryer6666 |
| tjrtyuyjjfyu | tryer6666 |
| hdgf | tryer6666 |
Solved! Go to Solution.
Yes, do this in Power Query.
Select the Task column, then Group By.
Group by Task, create a new column as "All Rows" operation.
Add a custom column: Text.Combine([AllRows][Location], ", ")
Remove the AllRows column.
If this answer helped, please click 👍 or Accept as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande
Hi,
Yes, this is possible in Power Query using Group By + Text.Combine.
Steps in Power Query
Use this M code example:
Table.Group(
Source,
{"Task"},
{
{"Location", each Text.Combine([Location], ", "), type text}
}
)
Expected Output
Task | Location |
12345trtr | shfh-y0998, gfhdgh-354y |
565656kjhjhkh | 45-dgfd, fdhdh098-5, hdfhtrh-453 |
tryer6666 | yuryt7865, tjrtyuyjjfyu, hdgf |
This will combine all Location values into a single row separated by commas based on the same Task.
You can also do this in DAX using CONCATENATEX(), but Power Query is the better approach if you want a summarized table and improved performance.
Hope this helps!
Thanks!
Hi @AllanBerces
You're already at the Grouped Rows step. The only thing missing is converting the nested table into a comma-separated list of locations.
Replace:
#"Grouped Rows" = Table.Group(#"Renamed Columns", {"TASK"}, {{"Count", each _, type table [TASK=text, LOCATION=nullable text]}})
with:
#"Grouped Rows" =
Table.Group(
#"Renamed Columns",
{"TASK"},
{
{
"LOCATION",
each Text.Combine(
List.Transform([LOCATION], Text.From),
", "
),
type text
}
}
)
Then keep:
in
#"Grouped Rows"
This will give you one row per TASK and combine all LOCATION values into a single field separated by commas.
Hi,
Yes, this is possible in Power Query using Group By + Text.Combine.
Steps in Power Query
Use this M code example:
Table.Group(
Source,
{"Task"},
{
{"Location", each Text.Combine([Location], ", "), type text}
}
)
Expected Output
Task | Location |
12345trtr | shfh-y0998, gfhdgh-354y |
565656kjhjhkh | 45-dgfd, fdhdh098-5, hdfhtrh-453 |
tryer6666 | yuryt7865, tjrtyuyjjfyu, hdgf |
This will combine all Location values into a single row separated by commas based on the same Task.
You can also do this in DAX using CONCATENATEX(), but Power Query is the better approach if you want a summarized table and improved performance.
Hope this helps!
Thanks!
Hi @Kedar_Pande @SamInogic sorry but Im frezz on this
let
Source = #"115MRR",
#"Merged Columns" = Table.CombineColumns(Source,{"ACCOUNT NO", "MATERIAL CODE"},Combiner.CombineTextByDelimiter("-", QuoteStyle.None),"WON-ARTICLE No."),
#"Removed Other Columns" = Table.SelectColumns(#"Merged Columns",{"WON-ARTICLE No.", "LOCATION"}),
#"Renamed Columns" = Table.RenameColumns(#"Removed Other Columns",{{"WON-ARTICLE No.", "TASK"}}),
#"Grouped Rows" = Table.Group(#"Renamed Columns", {"TASK"}, {{"Count", each _, type table [TASK=text, LOCATION=nullable text]}})
in
#"Grouped Rows"
Hi @AllanBerces
You're already at the Grouped Rows step. The only thing missing is converting the nested table into a comma-separated list of locations.
Replace:
#"Grouped Rows" = Table.Group(#"Renamed Columns", {"TASK"}, {{"Count", each _, type table [TASK=text, LOCATION=nullable text]}})
with:
#"Grouped Rows" =
Table.Group(
#"Renamed Columns",
{"TASK"},
{
{
"LOCATION",
each Text.Combine(
List.Transform([LOCATION], Text.From),
", "
),
type text
}
}
)
Then keep:
in
#"Grouped Rows"
This will give you one row per TASK and combine all LOCATION values into a single field separated by commas.
Yes, do this in Power Query.
Select the Task column, then Group By.
Group by Task, create a new column as "All Rows" operation.
Add a custom column: Text.Combine([AllRows][Location], ", ")
Remove the AllRows column.
If this answer helped, please click 👍 or Accept as Solution.
-Kedar
LinkedIn: https://www.linkedin.com/in/kedar-pande
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 20 | |
| 17 | |
| 12 |
| User | Count |
|---|---|
| 64 | |
| 55 | |
| 42 | |
| 38 | |
| 30 |