Forum Discussion
ValeriaBreve
Post Partisan
3 years agoUse a formula for a column name
Hello, I am trying to use a formula to call a column name to avoid tedious and long code rewriting (many years to compile....). In particular, I am reading the Year from the column name: YearOfRe...
- 3 years ago
ValeriaBreve You can use this -
GroupedRows = Table.Group ( #"Changed Type", {"Product"}, { { "Amount", (Rows)=> // All Rows & Columns visible for the current Product List.Sum ( Table.Column ( Rows, "Jan" & Number.ToText ( Year ) & "Volume" ) ) } } )
AntrikshSharma
Community Champion
3 years agoValeriaBreve You can use this -
GroupedRows =
Table.Group (
#"Changed Type",
{"Product"},
{
{
"Amount",
(Rows)=> // All Rows & Columns visible for the current Product
List.Sum (
Table.Column (
Rows,
"Jan" & Number.ToText ( Year ) & "Volume"
)
)
}
}
)
ValeriaBreve
Post Partisan
3 years agoIt works very well! Thank you so much 🙂