# 1,2,3. If not 3 then 2, If not 2 or 3, 1.

## Recommended Posts

Greetings,

I have three (Number) fields: Field1, Field2, Field3 that track Cost.

I am looking for a calculation that will accomplish this logic.

If there is no value in Field3, Field2.

If there is no value in Field3 or Field2, Field1.

Any suggestions would be greatly appreciated.

Edited by Guest

##### Share on other sites

Case ( IsEmpty ( Field2 ) AND IsEmpty ( Field3 ), Field1, IsEmpty ( Field3 ), Field 2 ) )

What about when there is something in Field 3 but not 2?

##### Share on other sites

There will always be something in field2. There has to be something in field2 before field3 can occur.

Thanks for the feedback, much appreciated, I will implement this into my system.

Thanks again.

##### Share on other sites

Greetings,

I have three (Number) fields: Field1, Field2, Field3 that track Cost.

I am looking for a calculation result that will take the ladder of these 3 arguments:

If Field1 has a value,1

If Field2 has a value,2

If Field3 has a value,3

Meaning, if there is a value in field1, field1. If there is a value in field1 and field2, field2. I there is a value in field1,field2 and field3, field3.

Note: If there is a value in field3, there will always be info in field1 and field2. If there is a value in field2, there will always be a value in field1.

I apologize for posting a similar question last week, my requirements have changed.

Thank you kindly.

Edited by Guest

##### Share on other sites

There's probably a more fun and elegant solution, but here:

```
Case(

Field3 ; 3 ;

Field2 ; 2 ;

Field1 ; 1 )

```

Oh, if you're in FM6 use commas instead of semicolons.

##### Share on other sites

I apologize for posting a similar question last week, my requirements have changed.

I merged your two topics, and sent you a Private Topic to explain why.

Lee

##### Share on other sites

Fitch, that works perfect. Thank you all for your help.

Edited by Guest

## Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×

×
×
• Create New...