If-AND (&&) Statement in Power Pivot

btodres

New Member
Joined
Feb 12, 2012
Messages
11
I am trying to create a measure that will look at 3 columns of numbers and select the lowest number, my formula which is not working :( is as follows:

=if(('Pfizer Numbers'[Sum of 300x600 Only]<='Pfizer Numbers'[Sum of 300x250 only]&&
'Pfizer Numbers'[Sum of 300x600 Only]<='Pfizer Numbers'[Sum of 728x90 only]),'Pfizer Numbers'[Sum of 300x600 Only],


if(('Pfizer Numbers'[Sum of 728x90 Only]<='Pfizer Numbers'[Sum of 300x250 only]&&
'Pfizer Numbers'[Sum of 728x90 Only]<='Pfizer Numbers'[Sum of 300x600 only]),'Pfizer Numbers'[Sum of 728x90 Only],


if(('Pfizer Numbers'[Sum of 300x250 Only]<='Pfizer Numbers'[Sum of 300x600 only]&&
'Pfizer Numbers'[Sum of 300x250 Only]<='Pfizer Numbers'[Sum of 728x90 only]),'Pfizer Numbers'[Sum of 300x250 Only],0)))

When I create a similar spread sheet using an excel table and use a similar formula, I get the right answer:
[TABLE="width: 384"]
<colgroup><col></colgroup><tbody>[TR]
[TD]IF(AND([@one]<=[@two],[@one]<=[@three]),[@one],
IF(AND([@two]<=[@one],[@two]<=[@three]),[@two],
IF(AND([@three]<=[@one],[@three]<=[@two]),[@three])))[/TD]
[/TR]
[TR]
[/TR]
[TR]
[/TR]
</tbody>[/TABLE]


any help would be greatly appreciated!
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

Forum statistics

Threads
1,223,958
Messages
6,175,627
Members
452,661
Latest member
Nonhle

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