I need to subtract fields (“MKT_TOTAL”-“OrgTotal”) in first record value (“MKT_TOTAL’) it will go all the way down like a rolling sum but minus. When the beginning total runs out it should show 0 instead of a minus number.
Table name= bus_sales
Goal:
BUSINESS_NAME UNID ORDID OrgTotal MKT_TOTAL PERIOD_DT
Locksmith 587700010001 5877000100016/16/2009 $2,000.00 $1,000.00 6/16/2009
Locksmith 587700010001 0003765655 $281.26 $718.74 7/24/2009
Locksmith 587700010001 0003765656 $281.26 $437.48 7/24/2009
Locksmith 587700010001 0003765657 $281.26 $156.22 7/24/2009
Locksmith 587700010001 0003765674 $539.00 $0.00 7/24/2009
Locksmith 587700010001 0003765675 $539.00 $0.00 7/24/2009
Locksmith 587700010001 0003767336 $0.88 $0.00 7/28/2009
Locksmith 587700010001 00072S2072 $400.00 $0.00 6/16/2010
Table name= bus_sales
Goal:
BUSINESS_NAME UNID ORDID OrgTotal MKT_TOTAL PERIOD_DT
Locksmith 587700010001 5877000100016/16/2009 $2,000.00 $1,000.00 6/16/2009
Locksmith 587700010001 0003765655 $281.26 $718.74 7/24/2009
Locksmith 587700010001 0003765656 $281.26 $437.48 7/24/2009
Locksmith 587700010001 0003765657 $281.26 $156.22 7/24/2009
Locksmith 587700010001 0003765674 $539.00 $0.00 7/24/2009
Locksmith 587700010001 0003765675 $539.00 $0.00 7/24/2009
Locksmith 587700010001 0003767336 $0.88 $0.00 7/28/2009
Locksmith 587700010001 00072S2072 $400.00 $0.00 6/16/2010