The current implementation is not very convenient when you need to deal with complex expressions. This screenshot clearly shows what I mean:

Instead I suggest creating something like this:

In this GIF, I combined two concepts (I don’t know which one would be better): the typeahead in a gray rectangle and simple dropdowns with a “+” button that allows users to enter expressions of arbitrary length.
I think any solution would be more convenient than what we have now ;-)
The current implementation is not very convenient when you need to deal with complex expressions. This screenshot clearly shows what I mean:

Instead I suggest creating something like this:
In this GIF, I combined two concepts (I don’t know which one would be better): the typeahead in a gray rectangle and simple dropdowns with a “+” button that allows users to enter expressions of arbitrary length.
I think any solution would be more convenient than what we have now ;-)