Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello all,
I compare two fields in a load statement. But, the result is not correct.
Below the detail of my script and in the attached file the output this script :
[Temp_1]:
LOAD DISTINCT
Item_No,
IF(NewTaux2<(OldRatio*100), OldRatio*100 & '%', NewTaux2) As NewRatio
RESIDENT Temp_0;
Please could you tell me what's wrong in my script.
Thank you in advance for your help.
Temp_1:
LOAD DISTINCT
Item_No,
IF(NewTaux2<(OldRatio*100), OldRatio*100 & '%', NewTaux2) As NewRatio
Inline [
Item no, NewTaux2, OldRatio
51256, 90% ,0.2];
You are getting the correct output as I see it.
If (90%<20, 20%, 90%) should return 20%
Please explain your desired result.
Hello @Vegar ,
Thank you for your reply.
My purpose is to return the upper value between NewTaux2 and OldRatio.
So, if NewTaux2 is upper than OldRatio then NewRatio is equal to NewTaux2.
Else, that's mean that NewTaux2 is lower than OldRatio and per consequent NewRatio is equal to OldRatio.
Please how can I modify my expression in order to return the result describe above.
Thank you in advance for your help.
Re,
Try it and this works perfectly 👍
Many thanks for your help !