Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
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
D9000 3
How can I do this ?
Regards Tony
Solved! Go to Solution.
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
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
let
Source = your_table,
group = Table.Group(Source, {"Origin2"}, {{"Count", each {1..Table.RowCount(_)}}}),
expand = Table.ExpandListColumn(group, "Count")
in
expand
= 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
Excel Power Query from same workbook:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
group = Table.Group(Source, {"Origin2"}, {{"Count", each {1..Table.RowCount(_)}}}),
expand = Table.ExpandListColumn(group, "Count")
in
expand
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WcrEwMDBQitVBYVniZMUCAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Origin2 = _t]),
group = Table.Group(Source, {"Origin2"}, {{"Count", each {1..Table.RowCount(_)}}}),
expand = Table.ExpandListColumn(group, "Count")
in
expand
Hi @foodd
Thank you
I get the measage:
Expression.Error: We cannot convert a value of type Table to type Function.
Details:
Value=[Table]
Type=[Type]
You have a single column table in your original message. What is SAPimport? We are not aware of this.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 4 | |
| 4 | |
| 2 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 11 | |
| 11 | |
| 5 | |
| 4 | |
| 4 |