Forum Discussion
merge rows
- 8 years ago
Conceptually, queries shape unstructured data into tables. Next, DAX (and visuals) may kick in for further data analysis, like aggregation and (filter) context sensitive calculations.
So, in this specific case, I would recommend a Power Query solution, even though it can also be done with DAX (in combination with visuals).
In the Query Editor, make sure the table columns are of type text, then fill down the first column, group by the first column, specifying a dummy operation for Head_2 (e.g. Max) and then adjust the generated code to have the text combined:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Head_1", type text}, {"Head_2", type text}}),
#"Filled Down" = Table.FillDown(#"Changed Type",{"Head_1"}),
#"Grouped Rows" = Table.Group(#"Filled Down", {"Head_1"}, {{"Head_2", each Text.Combine(_[Head_2]," "), type text}})
in
#"Grouped Rows"- MarcelBeug8 years agoCommunity Champion
Conceptually, queries shape unstructured data into tables. Next, DAX (and visuals) may kick in for further data analysis, like aggregation and (filter) context sensitive calculations.
So, in this specific case, I would recommend a Power Query solution, even though it can also be done with DAX (in combination with visuals).