curDT = Document.ActiveDataTableReference
cols = curDT.Columns
#targetCol = Document.Properties["myColumnSelection"]
#Create a new column that counts the comma delimiter
myExpression = "sum([Goods]) over([statecode])"
myNewColName = cols.CreateUniqueName("TotalRevenue")
cols.AddCalculatedColumn(myNewColName, myExpression)