Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi I am trying to add multiple if conditions for the below task as hand:
if d<30
result=([90+(Rent-8000)]/1000)*3
else if 30<d<60
result=([100+(Rent-8000)]/1000)*3
else if 60<d<90
result=([110+(Rent-8000)]/1000)*3
I tried this using multiple if statement in the script editor LOAD. However, I get error if I try to use multiple conditions under one if statement.
Could any one please help me to work on the right approach towards this issue ?
Thanks!
That screenshot is not showing me anything to prove to me that at the moment of doing a resident load on NTMs there are not multiple values of for either "d" or "Rent".
As a calculation does not randomly make up numbers (or at least not this basic calculation), I see no other explanation.
Sorted now. There was some issues because of synthetic table. Thanks
LOAD
d,
Rent,
If(d<30, (90+((Rent-8000)/1000)*3), If(d>=30 and d<60, (100+((Rent-8000)/1000)*3), If(d >= 60 and d<90, (110+((Rent-8000)/1000)*3),If(d >= 90 and d<120, (120+((Rent-8000)/1000)*3),If(d >= 120 and d<150, (140+((Rent-8000)/1000)*3),If(d >= 150 and d<180, (150+((Rent-8000)/1000)*3),If(d >= 180 and d<210, (160+((Rent-8000)/1000)*3),(170+((Rent-800)/1000)*3)))))))) as FieldName
Resident NTMs;
Here, You have mentioned single 800 only. Is that is correct? or you may miss to add one more 0 like 8000
Thanks for pointing out, fixed that too