Custom case() expression ignoring ()'s

Hi,
I wrote the follow custom expresssion:

case(
    (
      [Invoice Type] = "ClosedInvoice" OR
    ( 
      [Invoice Type] = "SettledInvoice" AND [Invoice Total Premium Local] < 0
    )
    ), "Yes", "No")

But when I save Metabase seems to strip the expression of its internal ()'s making the Logic statement incorrect. Also, we have seen it cause the Metabase UI to just spin, which blocks me from now using that Question.

Any help on how I can incorporate a CASE with an OR statement?

thanks

Hi @Kieran_m
Post "Diagnostic Info" from Admin > Troubleshooting. And when you see spinner, then check the logs and browser console for errors.

You're seeing this issue:
https://github.com/metabase/metabase/issues/13306 - upvote by clicking :+1: on the first post

You would have to create two Custom Columns, one with the parenthesis and one using that column.

1 Like

Thanks @flamber, yes that seems to be the same issue.