Forum Discussion
Alicia_Bucci
Dec 06, 2021Copper Contributor
Power Query Multiple IF Conditions in Custom Column
Good morning, I have a formula calculated in Excel that I am now looking to calculate in Power Query. I know I can only use column reference while writing IF statements in PQ. Can you please let...
- Dec 06, 2021
I'd simplify initial formula first, perhaps
=IF( M5=N5, M5, IF( M5="BLANK1", IF( N5="BLANK2","Investigate", N5), IF( N5="BLANK2", M5, IF( M5 <> N5, "300-Corporate", "ERROR" ) ) ) )
with that
=if [M] = [N] then [M] else if [M] = "BLANK1" then if [N] = "BLANK2" then "Investigate" else [N] else if [N] ="BLANK2" then [M] else if [M] <> [N] then "300-Corporate" else "ERROR"
Alicia_Bucci
Dec 06, 2021Copper Contributor
SergeiBaklan Thank you for your help! It is greatly appreciated.
If I wanted to add "O5" to this formula, is that doable or will that create an issue with the formula?
SergeiBaklan
Dec 06, 2021Diamond Contributor
I only tried to illustrate what Riny_van_Eekelen suggested and didn't test the formula. As for O5 - question is bit abstract, not clear in which part of formula you'd like to add it and what formula shall do with it.
Perhaps you may illustrate the logic if not with draft formula, when by diagram like
(again didn't test)