Column invalid in the select list because it is not contained in either an aggregate function or the

Hi,
I’m having some issues with Looker Studio, which I cannot solve. I have loaded my table “Customers” from my Postgres database. I’m creating a new field based on the Status column:

The formula works, and I can save the field. When I want to create a visualization using this field as a dimension, I get the following error:

If I create a table, and use both the “Status” field and the “test” field as dimensions, then the table loads. However, if I don’t add the “Status” as a dimension in the table, then I get this error. Can someone help me?