Strange results for nested IF after data refresh

Concetta

New Member
Joined
Jul 28, 2011
Messages
1
Hello all - I have an odd situation - making it even odder is the fact that a google search doesn't produce a million people having the same problem.

I have a calculated column with the following formula to identify outliers in contract values:

=if(deal[avg_price]<480,1,if(deal[avg_price]>14800,1,0))

I am attempting to identify (with a "1") any contracts that fall below $480 or above $14,800 as an outlier.

The formula only sort of works - when I refresh the underlying data (e.g., new month), the formula yields weird results - "1" where it is clearly a "0" and vice versa, but not in every case - only some are wrong - no logic. If I go in and add something to the formula (an extra character, for example), hit enter, get an sytax error message, and then change the formula back (delete the extra character), the results are then accurate.

This worries me. I have had odd results with other nested IF statements, as well.

Thank you, in advance, for your insight.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
It's funny but until I read your post I'd never noticed an issue with nested IF()s!

Not sure whether it entirely explains your issue but the following formula behaves totally differently in PowerPivot than it does in Excel:

Code:
=IF([Week Commencing]="25/01/2013",4,IF([Week Commencing]="04/02/2013",11,IF([Week Commencing]<="06/05/2013",14,BLANK())))

In PowerPivot the 3rd IF() seems to override the previous IF()s which is definitely not the case in Excel where the formula moves to the end of the IF once the condition is satisfied. My guess is that not only is this a bug potentially yielding the 'wrong' answer but that it must have a negative effect on performance as it evaluates every criteria regardless.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top