Forum Discussion
jct999
2 years agoAdvocate II
Dynamic grouping with M (PQ)
Hello, I have a table myTable with 21 columns : The first one is the column "key" The others are named "value_1", "value_2" .... "value_20" I have a list that contains a subset of the colum...
- 2 years ago
Or with Table.Group
= Table.Group(
myTable,
{"key"},
List.Transform(
myList,
each {
"Sum_"& _,
Expression.Evaluate("each List.Sum(["& _ &"])", #shared),
type number
}
)
)Stéphane
slorin
2 years agoSuper User
Or with Table.Group
= Table.Group(
myTable,
{"key"},
List.Transform(
myList,
each {
"Sum_"& _,
Expression.Evaluate("each List.Sum(["& _ &"])", #shared),
type number
}
)
)
Stéphane