Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
JustinRamsey
Creator
Creator

Script/Formula Decipher

Good Afternoon, 

I am looking at a report that was created before my time with the company and I am having trouble deciphering part of the load script and a formula that ties to the fields in question. 

The load statement  in question is below. VBRP.FKDAT is Invoice Date FYI. 

Year(VBRP.FKDAT) as KAL_FKDAT.Jahr_FKDAT,

The formula i am trying to decipher after that is: 

=if( num(month(today())) = 1 and num(day(today())) <= 5,
sum( {$< KAL_FKDAT.Jahr_FKDAT = {"$(=year(today())-2)"} >} VBRP.NETWR_EFF / fabs(VBRP.REPORT_USA_KURRF) ),
sum( {$< KAL_FKDAT.Jahr_FKDAT = {"$(=year(today())-1)"} >} VBRP.NETWR_EFF / fabs(VBRP.REPORT_USA_KURRF) )
)

Field VBRP.REPORT_USA_KURRF is Exchange Rate and field VBRP.NETWR_EFF is the invoice amount. 

Can anybody explain to me exactly what that function is doing?

1 Reply
lockematthewp
Creator II
Creator II

Hope this helps.

if today is Jan 1-5,
then return sum of ({Invoice Date Year = two years ago} invoice amount / absolute value (Exchange Rate)),
else return sum of ({Invoice Date Year = last year} invoice amount / absolute value (Exchange Rate))