Quantcast
Channel: Desktop topics
Viewing all articles
Browse latest Browse all 213910

Better Alternative for a Nested IF with multiple Columns in a Logical Test?

$
0
0

The code below works, but I hear using nested IF's is not the most elegant way to go. I am not a programmer, so I need a bit of advice. Is there a better way to achieve what I am doing, or is it simple enough to keep it as is? I would have used SWITCH, but i have to run a logical test against two columns in two of those IF statements, and I don't believe SWITCH handles that. 

 

Milestone Saturation = 
	IF(Tasks[Milestones Lead (Days)] > 0 && Tasks[TaskPercentCompleted] = 100,"Complete",
		IF(Tasks[Milestones Lead (Days)] > 0 && Tasks[TaskPercentCompleted] = 0,"Late",
			IF(Tasks[Milestones Lead (Days)] = 0, "Current",
				IF(Tasks[Milestones Lead (Days)] < 0 && Tasks[Milestones Lead (Days)] >= - 3, "Upcoming",
					IF(Tasks[Milestones Lead (Days)] < -3, "Future"
		)))))

Thanks!


Viewing all articles
Browse latest Browse all 213910

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>