Conditional column
A column whose value is chosen by if … then … else tests evaluated top to bottom.
Tests run in order and the first true condition wins, so put the narrow cases before the broad ones. Every branch should return the same type, and the final else catches values you didn't expect. For long lists of codes, a mapping table merged into the query is easier to maintain.
In the Power Query editor
Add Column → Conditional Column builds if … then … else from rules; Custom Column lets you write it yourself.
Common mistake
Putting a broad rule above a narrow one, for example Amount > 0 before Amount > 1000, so the narrow branch can never be reached. A second common slip is leaving out a final else, which gives null for every value you didn't plan for and hides new codes in the source. Order the tests from most specific to most general, end with an else that returns a clear label such as Unknown, and check the counts of each result after refresh.