Conditional Column
Power Query has a feature called Conditional Column, and its mission is to emulate the Excel IF function. That is, by checking the conditions for the given column and the value returns the result if the condition is fulfilled and optionally the result if not. If no other parameter is specified it returns a NULL value in rows that do not meet the specified condition. Let’s see how this option is used!
The Power Query Editor imported a table of item names, purchase price (NC), sales price (PC), and price difference (RUC). How to check if the price difference is more than 20.00 RSD? In the Add Column ribbon, select the Conditional Column option. This will open a dialog where you must first enter the name of the new column that will be created as a result of this operation. Then we enter the name of the column we compare, further the condition, and then the value to compare it with. In the Output field, enter the result that will appear in the row where the conditions are met. In the Otherwise field, enter an optional result that will appear if the condition is not met.
Whether we enter a conditional value, the result returned if it is met, or the alternative result, we can choose whether to enter a value, column or a parameter.