Expression Help

G

Guest

I am trying to create an expression and I just can't get it right. I have a
field called Variance %. I want to create a field called % Variance Result.
If the Variance % is 5% or less, I want % Variance Result to show "Pass". If
greater than 5%, "Fail". Here is what I have so far:

iif([Variance %]<="5%","Pass","Fail")

What am I doing wrong?

Also, is there a way to do a sliding scale? I have a field that represents
the total value and a field that represents the value of the variance. Total
Value is divided by variance to get the Variance %. If i have a different
standard for variance on things of higher value, can I represent that in this
expression?

Thanks
 
K

Kerry

Is [Variance %] a text or a number? If it is a text, try changing it
to a number, and use:

iif([Variance %]<=.05,"Pass","Fail")

For a different standard:
iif([Variance %]<=.1 and [Variance %]>.05,"High Pass",iif([Variance
%]<=.05,"Pass","Fail")
 
G

Guest

I tried the first one and it did not work. When I looked at the for it
displayed: #Name?
--
Drock-13


Kerry said:
Is [Variance %] a text or a number? If it is a text, try changing it
to a number, and use:

iif([Variance %]<=.05,"Pass","Fail")

For a different standard:
iif([Variance %]<=.1 and [Variance %]>.05,"High Pass",iif([Variance
%]<=.05,"Pass","Fail")

I am trying to create an expression and I just can't get it right. I have a
field called Variance %. I want to create a field called % Variance Result.
If the Variance % is 5% or less, I want % Variance Result to show "Pass". If
greater than 5%, "Fail". Here is what I have so far:

iif([Variance %]<="5%","Pass","Fail")

What am I doing wrong?

Also, is there a way to do a sliding scale? I have a field that represents
the total value and a field that represents the value of the variance. Total
Value is divided by variance to get the Variance %. If i have a different
standard for variance on things of higher value, can I represent that in this
expression?

Thanks
 
G

Guest

It would seem likely you're comparing a number field to a string ( "5%" ),
you probably want to use .05 instead.

And yes, you can use different standards in this expression. Something to
the tune of: iif([Total Value]/[Variance] <= [Variance
Standard],"PASS","FAIL")
 

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

Similar Threads

Working with negative numbers. 3
Help Please 8
Subtract from Zero 1
Expressions/formula in Access report 3
Count IIF 4
help with formula 1
Interpreting T Test 2
NetworkDays 3

Top