9 Replies Latest reply on May 2, 2018 2:35 PM by bouzid.aissaoui

# If Else statement not working properly

Hi All,

I have a problem with my If Else statement. The percentages are not calculating properly.

This is my calculated field:

This is the result:

How come the percentage is calculated incorrectly?

Much appreciated!

Andrew

• ###### 1. Re: If Else statement not working properly

Are the fields already aggregated? If not, then try

IF SUM([Octcurr Avgasset Cad Amt]) <= 0 THEN 0

1 of 1 people found this helpful
• ###### 2. Re: If Else statement not working properly

Thanks Okechukwu, however it is still not working.

It is not aggregated:

This is now the formula:

This is the result, still not working:

Andrew

• ###### 3. Re: If Else statement not working properly

You have it as:

when it should be:

You need to wrap the Numerator in its own SUM() function and the Denominator in its own SUM() function.

1 of 1 people found this helpful
• ###### 4. Re: If Else statement not working properly

Look at my original formula. There is one SUM() missing in the second line. Add it and see how it goes.

IF SUM([Octcurr Avgasset Cad Amt]) <= 0 THEN 0

1 of 1 people found this helpful
• ###### 5. Re: If Else statement not working properly

Ahhh! Thank you Michael! it works now

Much appreciated!

• ###### 6. Re: If Else statement not working properly

Got it working now! That was the problem. Thank you Okechukwu!

Andrew

• ###### 7. Re: If Else statement not working properly

If this is in a table, I ran into this the other day. I think where your end result is actually adding percentages together. In your Marks card, can you change the Measure of the Grw Avgasset Cad Amt % to be Minimum?

• ###### 8. Re: If Else statement not working properly

You're welcome Andrew. Glad it helped.

Could you please mark my first response as correct?

Ossai

• ###### 9. Re: If Else statement not working properly

Why the sum and not the field it self ?