Forum Discussion
Pivot Column with Don't aggregate
- 8 years ago
Pivot without aggregation won't combine values for you, as you are expecting for the modules that are completed by Mr/s b.
So you can first use "Group By" to combine those values: select all columns except "Module Name", choose "Group By" with operation Maximum for column Module Name (this is just a dummy operation to have basis code generated) and adjust the code to have the module names combined.
Now you can pivot.
let Source = Table1, #"Grouped Rows" = Table.Group(Source, {"Name", "Email", "Module Status"}, {{"Modules", each Text.Combine([Module name],","), type text}}), #"Pivoted Column" = Table.Pivot(#"Grouped Rows", List.Distinct(#"Grouped Rows"[#"Module Status"]), "Module Status", "Modules") in #"Pivoted Column"
Pivot without aggregation won't combine values for you, as you are expecting for the modules that are completed by Mr/s b.
So you can first use "Group By" to combine those values: select all columns except "Module Name", choose "Group By" with operation Maximum for column Module Name (this is just a dummy operation to have basis code generated) and adjust the code to have the module names combined.
Now you can pivot.
let
Source = Table1,
#"Grouped Rows" = Table.Group(Source, {"Name", "Email", "Module Status"}, {{"Modules", each Text.Combine([Module name],","), type text}}),
#"Pivoted Column" = Table.Pivot(#"Grouped Rows", List.Distinct(#"Grouped Rows"[#"Module Status"]), "Module Status", "Modules")
in
#"Pivoted Column"Thank you! Now, values cominng in comma separated, I would like to disply each row wise Like below
| Source | Expected Result | Now its displaying | ||||||||
| Col 1 | Col2 | |||||||||
| A | 1 | A | B | C | A | B | C | |||
| B | 2 | 1 | 2 | 3 | 1,5 | 2,6 | 3,7 | |||
| C | 3 | 5 | 6 | 7 | ||||||
| A | 5 | |||||||||
| B | 6 | |||||||||
| C | 7 | |||||||||
Is it possible to disply values like above?