Custom Expression boolean comparison

I have two columns with booleans. I want to create a pie graph of both false versus either true.

I’m trying to use Custom Expressions to find this.

The first test I’m trying is just can I count all the rows that have true. I can’t seem to make this Custom Expression work.

The expression on the left is not allowed, and the expression on the right is allowed, but fails to visualize.

Is there a way to make this work? Cheers!

Hi @thatnzguy
You should be able to use 1 and 0 instead of true and false.
There’s an issue open about various user experience problems with the new expressions:
https://github.com/metabase/metabase/issues/12393 - upvote by clicking :+1: on the first post

Hello.
I can’t use 1 or 0 with PostgreSQL.
ERROR: operator does not exist: boolean = integer

How I can handle this?

@ivkor It seems like it’s not possible to use boolean yet, when used with Postgres. The only workaround I can think of is a View, where the boolean column is also added as integer.

I’ve moved this to it’s own issue, since too many things go merged under the old issue.
Sorry for the confusion. Please upvote the new issue:
https://github.com/metabase/metabase/issues/12393 - upvote by clicking :+1: on the first post