[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

MS Access 2013

I would like to know what formula I can use in Query calculated field for the attach example.
I would like to use  the formula where it will give me Calculated field result. "iif Status column has "N/A" then 0 otherwise give me number in the status field".

ID   Name     Status     Calculated field
12  John        100              100
13  Chris        N/A               0
14  Mathe    345               345
15  Sam        N/A              0
0
snhandle
Asked:
snhandle
3 Solutions
 
Priya SudharsanCommented:
Refer the attached excel sheet. Just click on the "Calculated field" and see the formula.
Example.xlsx
0
 
Rgonzo1971Commented:
Hi,

Supposing Status is a text field

pls try

IIf([Status]="N/A";"0";[Status])

Or

IIf([Status]="N/A";0;[Status]*1)

Regards
0
 
Kelvin SparksCommented:
If you need a numeric output

IIf([Status] Is Null, 0, CInt([Status])) if the remaining values are integers,. Replace CInt with CLng if the numbers can exceeed 32767, or use CDbl if you want decimals or really large numbers.


Kelvin
0
 
Gustav BrockCIOCommented:
I would use:

=IIf(IsNumeric([Status]),[Status],0)

/gustav
0
 
snhandleAuthor Commented:
Good
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now