IF Condition with {} operator in powerpivot

lprabhu1107

Board Regular
Joined
Mar 10, 2011
Messages
106
Dear All,

I have following data

[TABLE="width: 96"]
<COLGROUP><COL style="WIDTH: 48pt" span=2 width=64><TBODY>[TR]
[TD="class: xl64, width: 64, bgcolor: transparent"]Origin[/TD]
[TD="class: xl64, width: 64, bgcolor: transparent"]Destin[/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]BOM[/TD]
[TD="class: xl63, bgcolor: transparent"]DXB[/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]DEL[/TD]
[TD="class: xl63, bgcolor: transparent"]SIN[/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]HYD[/TD]
[TD="class: xl63, bgcolor: transparent"]LHE[/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]DXB[/TD]
[TD="class: xl63, bgcolor: transparent"]BOM[/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]SIN[/TD]
[TD="class: xl63, bgcolor: transparent"]DEL[/TD]
[/TR]
[TR]
[TD="class: xl63, bgcolor: transparent"]LHR[/TD]
[TD="class: xl63, bgcolor: transparent"]HYD[/TD]
[/TR]
</TBODY>[/TABLE]

In column C i have used a formula to derive "true origin" in Excel 2010 as follows=if(or(a2={"bom","del","hyd"}),a2,b2).
Now how do i replicate the same formula in Powerpivot as it does not support{} operator?
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
I don't use Powerpivot but if all you need to do is loose the {} brackets then the formula can be rewritten as =IF(OR(A2="bom",A2="del",A2="hyd"),A2,B2)
 
Upvote 0
If you have more than just a few items inside the {}, then you can create a list of those items in a range, say E1:E10
And use
=IF(ISNUMBER(MATCH(A2,E1:E10,0)),A2,B2)
 
Upvote 0

Forum statistics

Threads
1,223,996
Messages
6,175,853
Members
452,675
Latest member
duongtruc1610

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