Forum Discussion
elliswoods
1 year agoFrequent Visitor
Divide IF value is over a certain amount
n
rohit1991
1 year agoSuper User
Hi elliswoods ,
There's no direct DIVIDEIF function in Power Query, but you can easily achieve this using a conditional column or a simple custom column with an if statement. Here's a quick workaround:
In Power Query, add a Custom Column with this formula:
= Table.TransformColumns(
YourPreviousStep,
{{"Amount", each if _ > 100 then _ / 52.143 else _}}
)
Replace YourColumnName with your actual column name. This will divide the value by 52.143 only if it's over 100, and leave it unchanged otherwise. You can then remove or replace the original column as needed.