'I'm trying to create custom column in google sheets with query funcion

I'm trying to create custom column in google sheets with query function.

for instance (in order to be simple) - I have this data.

enter image description here

and the result should look like this, if Revenue is more than 500 000 - Good and if not Bad:

enter image description here

is this possible to do this with query? I would appreciate you help.

=QUERY(A1:B4,"select *")

here is the link

https://docs.google.com/spreadsheets/d/129fUbXN_vaYVUocz5L3uN2M2ZUTVuPMy5-whfWx9qtY/edit?usp=sharing



Solution 1:[1]

Try

={A2:B,arrayformula(if(B2:B="",,if(B2:B>500000,"good","bad")))}

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mike Steelson