IIF - If condition apply correctly

In order to be able to apply the versatile uses and the correct composition of the IIF - If condition, we have compiled numerous examples from practice for you. In the first block, we introduce simple expressions. The second block is about so-called nested expressions and the last block is about practical standard cases, such as working with empty cells or date fields.

In our example we use a table with a customer master consisting of the columns Customer number as primary key and the further columns Postal code, Sales, Category and Potential.

The IIF - If condition always has the same structure, here the abstract form: IIF("condition", "true", "false"). An if-condition is set and the then-parameters are executed in the second part of the expression. Plamapatively, there is nothing else in the IIF - If condition than: if it rains (condition), then I take an umbrella (true), otherwise I put on sunglasses (false). So just follow the steps of the if-then logic and you should have less problems with the function.

Let's take a look at some examples using our table. If you click fx in the query dialog or in the table window and select a Calculated column, you will find the IIF - If conditionunder the Compare expression criteria.