cancel
Showing results for 
Search instead for 
Did you mean: 

IF THEN ELSE (what's wrong with my formula?)

Former Member
0 Kudos

Hello Experts,

I can't seem to find what's wrong with my IF / THEN / ELSE formula below. I've tried a number of iterations and researched on-line.  I'm working with a 7X query.

(GOAL >= 10000) * GOAL + (GOAL < 10000) *10000

Said another way:

If Salesman Goal is greater than or equal to $10000 then print the larger number (the original goal)

If Salesman Goal is less than $10000, then print $10000.

Can anyone tell me what I"m doing wrong?

Thanks,

Janice

Accepted Solutions (1)

Accepted Solutions (1)

yasemin_kilinc
Active Contributor
0 Kudos

Hi Janice,

Try this:

(NODIM(GOAL) >= 10000) * NODIM(GOAL) + (NODIM(GOAL) < 10000) *10000

Regards

Yasemin

Answers (4)

Answers (4)

Former Member
0 Kudos

Many thanks to everyone for your help and quick response to my question. I tried all solutions given and Yasemin's was the one that produced the result I expected in the query.

Thanks again!

Janice

Loed
Active Contributor
0 Kudos

Hi Janice,

All of the answers above are correct, you may try one of them..But try first the suggestion of Anshu so that you will know the answers for separate condition..

Thanks!

Loed

anshu_lilhori
Active Contributor
0 Kudos

Janice,I do not see anything wrong with the logic.You can try to split the conditions and check what result it is giving separately.

If it works perfectly then you can create a new formula and add both of them.

Regards,

AL

former_member182470
Active Contributor
0 Kudos

Hi,

Hope your "Goal" is a KF. If not turn it to KF by creating a Formula variable(Replacement Path).

I don't see anything wrong with your formula. But just try like below:--

(GOAL < 10000) *10000 + (GOAL >= 10000) * GOAL


Regards,

Suman