How to use two different formulas in a query depending on one value

alcorp

Registered User.
Local time
Yesterday, 18:59
Joined
Jul 2, 2014
Messages
10
Hi!

Okay i queried my results and I think I got what I need.

The next step is to process the info so I can display the results. I am trying to use the expression builder but I am getting stuck. (if there are any other ways, I am open to them)


So basically in a column I have value that is either a 'Y' or 'N'. From these values I have to create a ten digit number called an APN. I need it to where If the the value is a 'N' that the formula will concatenate a '9' then the numbers I have in another column called the UCN (which have 4 digits and some are leading with 0's) and then concatenate '00001' at the end. The result will look similar to--->9083400001 or 9892400001

For the 'Y' value I need to concatenate the '9' with the UCN (same as the other one) and then I have to concatenate with another column called the tax rate area. The result will have ten digits similar to ----> 9424112625 or 9082306987


And finally I have to create another column value called TaxFee which the product of the EDU column with the number 23.

So basically the results will look like this

APN____________TAXFEE
9048200001______328.95
9524855721______52.36




Anything helps, thanks!
 
As answered elsewhere:

Confused, but check out the IIf() function:

IIf(FieldName = "Y", OneCalculation, OtherCalculation)
 

Users who are viewing this thread

Back
Top Bottom