FORMAT==100
['Local', 'MTD Actual']=N:
  DB('GL',!Currency,'Actual',DB('Calendar','Current Year','String'),DB('Calendar','Current Month','String'),!Department,!Region,!Account,'Total Amount');

['Local', 'MTD Plan']=N:
  DB('GL',!Currency,'Budget Approved',DB('Calendar','Current Year','String'),DB('Calendar','Current Month','String'),!Department,!Region,!Account,'Total Amount');

['Local', 'MTD Variance']=
  IF(ATTRS('Account', !Account, 'Acct_Type')@='E',
    ['MTD Plan']-['MTD Actual'],
    ['MTD Actual']-['MTD Plan']
  );

['Local', 'MTD Var %']=
  ['MTD Variance']\ABS(['MTD Plan']);

['Local', 'YTD Actual']=N:
  DB('GL',!Currency,'Actual',DB('Calendar','Current Year','String'),DB('Calendar','Current YTD','String'),!Department,!Region,!Account,'Total Amount');

['Local', 'YTD Plan']=N:
  DB('GL',!Currency,'Budget Approved',DB('Calendar','Current Year','String'),DB('Calendar','Current YTD','String'),!Department,!Region,!Account,'Total Amount');

['Local', 'YTD Variance']=
  IF(ATTRS('Account', !Account, 'Acct_Type')@='E',
    ['YTD Plan']-['YTD Actual'],
    ['YTD Actual']-['YTD Plan']
  );

['Local', 'YTD Var %']=
  ['YTD Variance']\ABS(['YTD Plan']);

['Local', 'Trend']=
  ['YTD Actual']\['YTD Plan'];

['Local', 'Annual Plan']=N:
    DB('GL',!Currency,'Budget Approved',DB('Calendar','Current Year','String'),'Total Year',!Department,!Region,!account,'Total Amount');

['Local', 'Goal']=
  (['Annual Plan']-['YTD Actual'])\(['Annual Plan']-['YTD Plan']);

['Local', 'Plan to Go']=N:
  ['Annual Plan']-['YTD Actual'];
