Hi! I've experienced a problem creating custom expression using case statement. For some reason it requires the second parameter to be aggregation but following documentation "output" value should be in here. As a result I'm not able to create metric with custom if-else logic. This is how it looks in the UI.
Looks like you're entering that into the "summarize" custom expression right? Those need to use an aggregate (like min, max, sum etc.), it's not a row by row expression to get a custom column.
Your expression is appears to be a function type which you'd need to enter into the "Custom column" section of the query builder just after your joins, to get a new column created for each row of your data.