Forum Discussion
Scott4850
2 years agoFrequent Visitor
Pivot with Multiple Columns?
Obviously I'm not very knowledgeable about this, but I did think I could do this fairly easily with a Pivot, UnPivot, or Transpose...or some combination therof. But I am stumped. I can pivot on ...
- 2 years ago
fx = (tbl) => #table( {"Project"} & List.Combine(List.Transform(tbl[Task], (x) => {x & " (Start)", x & " (Finish)"})), {{tbl{0}[Project]} & List.Combine(Table.ToRows(tbl[[Start], [Finish]]))} ), group = Table.Group( your_table, "Project", {"x", fx} ), combine = Table.Combine(group[x])
AlienSx
2 years agoSuper User
fx = (tbl) => #table(
{"Project"} & List.Combine(List.Transform(tbl[Task], (x) => {x & " (Start)", x & " (Finish)"})),
{{tbl{0}[Project]} & List.Combine(Table.ToRows(tbl[[Start], [Finish]]))}
),
group = Table.Group(
your_table,
"Project",
{"x", fx}
),
combine = Table.Combine(group[x])- Scott48502 years agoFrequent Visitor
Thanks, I'll post back when I have a chance to try it.
- Scott48502 years agoFrequent Visitor
Thanks, I think I can kinda understand this one, but I keep getting 'expected EOF' at the comma at the end of fx = (tbl) => #table(...),
Also, just to make sure I understand, your_table is the name of my table from the previous step, which in my case is "Renamed Columns", so I would have #"Renamed Columns" there, correct?