Custom metric expression bug for "case" function v0.48.5

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.

Am I doing something wrong or it is actually a bug of 0.48.5 version? Thanks in advance for your response!

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.
image

Relevant docs:

You are right, I should've used custom column instead of metric custom expression. Thank you so much!