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
TonyHansson
2 years agoFrequent Visitor
= Table.AddColumn(#"Removed Columns4", "Custom", let source = SAPIMPORT,
group = Table.Group(source, {"Origin2"}, {{"Count",each {1..Table.RowCount(_)}}}),
expand = Table.ExpandListColumn(group, "Count")
in expand)
Expression.Error: The column 'Origin2' of the table wasn't found.
Details:
Origin2
Origin2 is not a part of the table "SAPimport" but created later
Tony
AlienSx
2 years agoSuper User
You have a single column table in your original message. What is SAPimport? We are not aware of this.
- TonyHansson2 years agoFrequent Visitor