Switch formula problem

D

Dmitry

Hi
I am using the following formula for a Graphical Indicator:
Switch([Total Slack]>=30,0,(([Total Slack]>=0) And ([Total
Slack]<=29)),1,[Total Slack]<0,2)
And for some reason this formula returns 0 when [Total
Slack]>0. Any ideas?

Thanks
Dmitry
 
J

JackD

30 is >0, your first condition says if Total Slack is >=30 then return 0.
So if Total Slack is 30 or more than it is absolutely correct.
You do know that Total Slack is measured in minutes.
In this case slack of even 1/2 hour would cause the formula to return 0.
I'd increase your numbers by a factor of 480 to get Total Slack in days.

-Jack
 
D

Dmitry

Thanks Jack. The key was that Total Slack is mesured in
minutes!
-----Original Message-----
30 is >0, your first condition says if Total Slack is
=30 then return 0.
So if Total Slack is 30 or more than it is absolutely correct.
You do know that Total Slack is measured in minutes.
In this case slack of even 1/2 hour would cause the formula to return 0.
I'd increase your numbers by a factor of 480 to get Total Slack in days.

-Jack


Hi
I am using the following formula for a Graphical Indicator:
Switch([Total Slack]>=30,0,(([Total Slack]>=0) And ([Total
Slack]<=29)),1,[Total Slack]<0,2)
And for some reason this formula returns 0 when [Total
Slack]>0. Any ideas?

Thanks
Dmitry


.
 
J

JackD

You are welcome. Usually when I write a formula for the first time I start
slow and check the values that I get for each field, then work on the
conditions.

-Jack


Dmitry said:
Thanks Jack. The key was that Total Slack is mesured in
minutes!
-----Original Message-----
30 is >0, your first condition says if Total Slack is
=30 then return 0.
So if Total Slack is 30 or more than it is absolutely correct.
You do know that Total Slack is measured in minutes.
In this case slack of even 1/2 hour would cause the formula to return 0.
I'd increase your numbers by a factor of 480 to get Total Slack in days.

-Jack


Hi
I am using the following formula for a Graphical Indicator:
Switch([Total Slack]>=30,0,(([Total Slack]>=0) And ([Total
Slack]<=29)),1,[Total Slack]<0,2)
And for some reason this formula returns 0 when [Total
Slack]>0. Any ideas?

Thanks
Dmitry


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top