Forum Discussion
TonyHansson
2 years agoFrequent Visitor
Count calculated columns
I have table. Origin2 D8000 D8000 D9000 D9000 D9000 I want add a column making a calculated count. Origin2 Count D8000 1 D8000 2 D9000 1 D9000 ...
- 2 years ago
Hi
Found this youtube:
= Table.AddColumn(BufferedTable, "RunningCount", (OT) => Table.RowCount( Table.SelectRows(BufferedTable, (IT) => IT[Transaction No] <= OT[Transaction No] and IT[Origin2] = OT[Origin2])))
Thank you for help
AlienSx
2 years agoSuper User
let
Source = your_table,
group = Table.Group(Source, {"Origin2"}, {{"Count", each {1..Table.RowCount(_)}}}),
expand = Table.ExpandListColumn(group, "Count")
in
expand