# IF(OR formula in Powerpivot // need help • ### Question

• Hello,

In Excel, I’ve written the following formula.

=IF(OR(H2=\$AW\$2; J2=\$AW\$2; L2=\$AW\$2; T2=\$AV\$2; W2=\$AV\$2; Y2=\$AV\$2);\$AZ\$2;\$BA\$2)

What would be the DAX equivalent for this formula?

Thanks,

Friday, February 17, 2017 2:00 PM

• Friday, February 17, 2017 5:47 PM
• Hello,

Double pipe " || " or OR() function servers as "or" condition between two boolean expression. For simplicity I usually use the double pipe

=IF(H2=\$AW\$2 || J2=\$AW\$2 || L2=\$AW\$2 || T2=\$AV\$2 || W2=\$AV\$2 || Y2=\$AV\$2);\$AZ\$2;\$BA\$2)

*** you will have to use fields instead of cells of course for this code to work

Here is the list of all the DAX operators. REF:  http://beyondvalence.blogspot.com/2013/08/p31-beginning-dax-1.html

Nick -

Friday, February 17, 2017 5:56 PM

### All replies

• Friday, February 17, 2017 5:47 PM
• Hello,

Double pipe " || " or OR() function servers as "or" condition between two boolean expression. For simplicity I usually use the double pipe

=IF(H2=\$AW\$2 || J2=\$AW\$2 || L2=\$AW\$2 || T2=\$AV\$2 || W2=\$AV\$2 || Y2=\$AV\$2);\$AZ\$2;\$BA\$2)

*** you will have to use fields instead of cells of course for this code to work

Here is the list of all the DAX operators. REF:  http://beyondvalence.blogspot.com/2013/08/p31-beginning-dax-1.html

Nick -

Friday, February 17, 2017 5:56 PM
• THanks it worked with the double pipes.

Wednesday, February 22, 2017 3:09 PM