Does anyone know if/how you can reference a previous running total variable to be used in a formula on a subsequent record? I have a variable running total for Sales for each new opportunity a sales rep closes. I need to reference that in a formula that calculates commission based on that prior running total value.
THANKS!
My running total variable is:
WhilePrintingRecords;
CurrencyVar UserTotal := UserTotal +
{amount}
The formula field that calculates the commission on a deal is (in part):
EvaluateAfter (
{@RunningTotal});
Global CurrencyVar D7 :={@RunningTotal}/{Compensation_Rate_Table__c.AAnnual_Quota_New__c};
Global CurrencyVar B7 :={@corrected new amount};
Global CurrencyVar K1 :={Compensation_Rate_Table__c.to_50_Quota__c}/100;
Global CurrencyVar H2 :={@Variable QuotaThreshold};
Global CurrencyVar K2 :={Compensation_Rate_Table__c.to_75_Quota__c}/100;
Global CurrencyVar K3 :={Compensation_Rate_Table__c.to_100_Quota__c}/100;
Global CurrencyVar B6 := (
{@RunningTotal});
IF Global CurrencyVar B7>Global CurrencyVar H2 and Global CurrencyVar D7<=0.75 then ((Global CurrencyVar ToQuota50- Global CurrencyVar B6)* Global CurrencyVar K1)+(Global CurrencyVar H2*Global CurrencyVar K2)+(Global CurrencyVar B7-Global CurrencyVar H2-(Global CurrencyVar ToQuota50 -Global CurrencyVar B6)*Global CurrencyVar K2) else
IF Global CurrencyVar B7>Global CurrencyVar H2 and Global CurrencyVar D7>0.75 then ((Global CurrencyVar ToQuota50-Global CurrencyVar B6)*Global CurrencyVar K1)+(Global CurrencyVar H2*Global CurrencyVar K2)+((Global CurrencyVar B7-Global CurrencyVar H2-(Global CurrencyVar ToQuota50- Global CurrencyVar B6))*Global CurrencyVar K3)