Hi all,
I have this if in my calculation column but somehow it is throwing me an error
The syntax I'm using is:
if(${true_bearing} >= 337.5 or ${true_bearing} < 22.5, 'N'), if(${true_bearing} >= 22.5 and ${true_bearing} < 67.5, 'NE'), if(${true_bearing} >= 67.5 and ${true_bearing} < 112.5, 'E'), if(${true_bearing} >= 112.5 and ${true_bearing} < 157.5, 'SE'), if(${true_bearing} >= 157.5 and ${true_bearing} < 202.5, 'S'), if(${true_bearing} >= 202.5 and ${true_bearing} < 247.5, 'SW'), if(${true_bearing} >= 247.5 and ${true_bearing} < 292.5, 'W','NW')
Any help will be much appreciated 🙂
Solved! Go to Solution.
Hey @ALBJORGUI
I think your syntax for your if statements may be incorrect, as these posts outline:
Try something like this here:
if(${true_bearing} >= 337.5 or ${true_bearing} < 22.5, 'N', if(${true_bearing} >= 22.5 and ${true_bearing} < 67.5, 'NE', if(${true_bearing} >= 67.5 and ${true_bearing} < 112.5, 'E', if(${true_bearing} >= 112.5 and ${true_bearing} < 157.5, 'SE', if(${true_bearing} >= 157.5 and ${true_bearing} < 202.5, 'S', if(${true_bearing} >= 202.5 and ${true_bearing} < 247.5, 'SW', if(${true_bearing} >= 247.5 and ${true_bearing} < 292.5, 'W', 'NW')))))))
Cody
Hey @ALBJORGUI
I think your syntax for your if statements may be incorrect, as these posts outline:
Try something like this here:
if(${true_bearing} >= 337.5 or ${true_bearing} < 22.5, 'N', if(${true_bearing} >= 22.5 and ${true_bearing} < 67.5, 'NE', if(${true_bearing} >= 67.5 and ${true_bearing} < 112.5, 'E', if(${true_bearing} >= 112.5 and ${true_bearing} < 157.5, 'SE', if(${true_bearing} >= 157.5 and ${true_bearing} < 202.5, 'S', if(${true_bearing} >= 202.5 and ${true_bearing} < 247.5, 'SW', if(${true_bearing} >= 247.5 and ${true_bearing} < 292.5, 'W', 'NW')))))))
Cody