Reputation: 155
I have written the folowing condition as per the some online tutorial
IF [Nationality]="England"
THEN "England"
ELSEIF [Nationality]="Germany"
THEN "Germany"
ELSE "Others"
END
But continuously getting an error:
"The formula must be a boolean formula"
What is wrong in the condition?
I have tried other statements too CASE
and CONTAINS
for them too same error.
It should accept.
Upvotes: 1
Views: 1118
Reputation: 21
Seems like you are trying an IF condition in one of your filters. In order for a filter condition to be valid, it should always evaluate to True or False. In your example, you may need to modify your code as below:
(IF [Nationality]="England"
THEN "England"
ELSEIF [Nationality]="Germany"
THEN "Germany"
ELSE "Others"
END) = <Some Column>
In the above code you are evaluating your IF condition against some column value.
Hope this helps!
Upvotes: 0
Reputation: 1771
It looks like you might be trying to filter by condition as pictured below. This field does, indeed, require a boolean condition. It needs to know whether to filter out (False) or keep in (True).
Instead of using this dialog box, try the following:
Right Click [Nationality] Field > Click "Create..." > Calculated Field
If you put your calculation in the dialog box that pops up, it will work. From there you can filter accordingly.
Upvotes: 1