Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: stonysmithThat is easy. You need to set an initial value for the variable, and then just use IF to condition the sum.
if firstInGroup then Total=0.0
if 'MyColumnOne' == "D" then Total=Total+'MyColumnTwo'
emit Total
===
you can even do it across multiple columns at once:
if firstInGroup then { TotalC=0.0 TotalD = 0.0 }
if 'MyColumnOne' == "C" then TotalC=TotalC +'MyColumnTwo'
if 'MyColumnOne' == "D" then TotalD=TotalD +'MyColumnTwo'
emit TotalC,TotalD