FORMAT==100
['Score Amt']=N:
  ['Result']\['Driver Result'];

['Financial','Result']=N:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'KPI') @= 'EVA',
    DB('KPIs',!Currency,!Version,!FiscalYear,'Total Year',!Region,'EVA (Economic Value Added)','Total Amount'),
    CONTINUE
  );

['Financial','Result']=N:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'KPI') @= 'EBIT',
    DB('GL',!Currency,!Version,!FiscalYear,'Total Year','All Departments',!Region,'EBIT','Total Amount'),
    CONTINUE
  );

['Financial','Result']=N:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'KPI') @= 'Sales/Unit',
    DB('KPIs',!Currency,!Version,!FiscalYear,'Total Year',!Region,'Sales/Unit','Total Amount'),
    CONTINUE
  );

['Financial','Result']=N:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'KPI') @= 'Gross Profit / Unit',
    DB('KPIs',!Currency,!Version,!FiscalYear,'Total Year',!Region,'Gross Profit/Unit','Total Amount'),
    CONTINUE
  );

['Financial','Result']=N:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'KPI') @= 'Net Profit/Unit',
    DB('KPIs',!Currency,!Version,!FiscalYear,'Total Year',!Region,'Net Profit/Unit','Total Amount'),
    CONTINUE
  );

['Financial','Result']=N:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'KPI') @= 'Net Profit/Employee',
    DB('KPIs',!Currency,!Version,!FiscalYear,'Total Year',!Region,'Net Profit/Employee','Total Amount'),
    CONTINUE
  );

#**************************************************************************
# Score +ve
#**************************************************************************
['Score']=S:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'+ve/-ve') @= '+ve',
    IF(['Score Amt'] >= ['Excellent Target'],
      'Excellent',
      CONTINUE
    ),
  CONTINUE
  );

['Score']=S:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'+ve/-ve') @= '+ve',
    IF(['Score Amt'] >= ['Ok Target'],
      'OK',
      CONTINUE
    ),
  CONTINUE
  );

['Score']=S:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'+ve/-ve') @= '+ve',
    IF(['Score Amt'] >= ['Marginal Target'],
      'Marginal',
      CONTINUE
    ),
  CONTINUE
  );

['Score']=S:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'+ve/-ve') @= '+ve',
   'Poor',
  CONTINUE
  );


#**************************************************************************
# Score -ve
#**************************************************************************
['Score']=S:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'+ve/-ve') @= '-ve',
    IF(['Score Amt'] <= ['Excellent Target'],
      'Excellent',
      CONTINUE
    ),
  CONTINUE
  );

['Score']=S:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'+ve/-ve') @= '-ve',
    IF(['Score Amt'] <= ['Ok Target'],
      'OK',
      CONTINUE
    ),
  CONTINUE
  );

['Score']=S:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'+ve/-ve') @= '-ve',
    IF(['Score Amt'] <= ['Marginal Target'],
      'Marginal',
      CONTINUE
    ),
  CONTINUE
  );

['Score']=S:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'+ve/-ve') @= '-ve',
   'Poor',
  CONTINUE

  );

#**************************************************************************
# Indicator
#**************************************************************************
['Indicator']=S:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'Score') @= 'Excellent',
    '* * * *',
    CONTINUE
  );

['Indicator']=S:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'Score') @= 'OK',
    '* * *',
    CONTINUE
  );

['Indicator']=S:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'Score') @= 'Marginal',
    '* *',
    CONTINUE
  );

['Indicator']=S:
  IF(DB('BalanceScorecard',!Currency,!Version,!FiscalYear,!Region,!Item,!BalanceScorecardQuadrant,'Score') @= 'Poor',
    '*',
    CONTINUE
  );


['Wghtd Score']=N:
  (['Score']*['Weighting'])\100;

['Wghtd %']=N:
  (['Score']*['Weighting'])\4;
