amandacody
Technical User
I'm trying to get a derived field to annualize a deduction based upon the employees company code. Here's the code I've got so far.
@DECODE(REPORTS.V_DEDUCTIONS.[[CO]],'YDJ',( SUM(DISTINCT @DECODE(REPORTS.V_DEDUCTIONS.DEDUCTIONCODE,'13',REPORTS.V_DEDUCTIONS.DEDUCTIONAMOUNT,0) ) )*24,'YDK',( SUM(DISTINCT @DECODE(REPORTS.V_DEDUCTIONS.DEDUCTIONCODE,'13',REPORTS.V_DEDUCTIONS.DEDUCTIONAMOUNT,0) ) )*26,'VRW',( SUM(DISTINCT @DECODE(REPORTS.V_DEDUCTIONS.DEDUCTIONCODE,'13',REPORTS.V_DEDUCTIONS.DEDUCTIONAMOUNT,0) ) )*26,0)
@DECODE(REPORTS.V_DEDUCTIONS.[[CO]],'YDJ',( SUM(DISTINCT @DECODE(REPORTS.V_DEDUCTIONS.DEDUCTIONCODE,'13',REPORTS.V_DEDUCTIONS.DEDUCTIONAMOUNT,0) ) )*24,'YDK',( SUM(DISTINCT @DECODE(REPORTS.V_DEDUCTIONS.DEDUCTIONCODE,'13',REPORTS.V_DEDUCTIONS.DEDUCTIONAMOUNT,0) ) )*26,'VRW',( SUM(DISTINCT @DECODE(REPORTS.V_DEDUCTIONS.DEDUCTIONCODE,'13',REPORTS.V_DEDUCTIONS.DEDUCTIONAMOUNT,0) ) )*26,0)