cancel
Showing results for 
Search instead for 
Did you mean: 

provision from certain year

DanielVisblut
Explorer
0 Kudos

Hi

I need to make a provision for member starting 2027 and for 3 years

the gradularity of the model is year

I wrote the amount of the loan, the start year to pay it and duration as measures
and wrote the input on 2023

this is the script its seems ok but and dont do the calculation

 IF INT(YEAR([d/Date])) = RESULTLOOKUP([d/Measures]="YearStart",[d/Date]="2023",[d/IAA_GLACCOUNT]="522383200")

or INT(YEAR([d/Date])) <=RESULTLOOKUP( [d/Measures]="YearStart",[d/Date]="2023",[d/IAA_GLACCOUNT]="522383200")+RESULTLOOKUP([d/Measures]="Duration",[d/Date]="2023",[d/IAA_GLACCOUNT]="522383200")

 

THEN

            //calculate the amount of the contract by startAmount

            Data([d/Measures]="Changes",[d/IAA_GLACCOUNT]="522383200")= RESULTLOOKUP([d/Measures]="StartAmount",[d/Date]="2023",[d/IAA_GLACCOUNT]="522383200")

            // devided to the duration

            /RESULTLOOKUP([d/Measures]="Duration",[d/Date]="2023",[d/IAA_GLACCOUNT]="522383200")

ENDIF

Appreciate you help

@N1kh1l 

View Entire Topic
Kobi_Weinstein
Explorer

Hi Daniel,

you have a little mistake in your script.

This is the right Script:

IF INT(YEAR([d/Date])) >= RESULTLOOKUP([d/Measures]="YearStart",[d/Date]="2023",[d/IAA_GLACCOUNT]="522383200")
and INT(YEAR([d/Date])) < RESULTLOOKUP( [d/Measures]="YearStart",[d/Date]="2023",[d/IAA_GLACCOUNT]="522383200")
            +RESULTLOOKUP([d/Measures]="Duration",[d/Date]="2023",[d/IAA_GLACCOUNT]="522383200")

THEN
            //calculate the amount of the contract by startAmount
            Data([d/Measures]="Changes",[d/IAA_GLACCOUNT]="522383200")= RESULTLOOKUP([d/Measures]="StartAmount",[d/Date]="2023",[d/IAA_GLACCOUNT]="522383200")
            // devided to the duration
            /RESULTLOOKUP([d/Measures]="Duration",[d/Date]="2023",[d/IAA_GLACCOUNT]="522383200")
ENDIF