Hello,
Can someone tell me how I can pass a query or an expression to give a minimum result of 0 for this calculated field? the value should come to 0 even when the answer is in negetive.
.Hello,
Can someone tell me how I can pass a query or an expression to give a minimum result of 0 for this calculated field? the value should come to 0 even when the answer is in negetive.
.Hi @Sarthak1999
Using case()
- so like so:
case([some_column] < 0, 0, [some_column])
Hi @flamber
I used this function but im getting an error when i run the query (image- 3). Attatched the screenshots below.
It's not recognising my custom expression "forecast accuracy" as a column (image- 1) when i use the "case" function on it (image- 2)
@Sarthak1999 Without seeing the error, I'm guessing you're seeing this issue:
https://github.com/metabase/metabase/issues/13857 - upvote by clicking on the first post
You would have to do some of this in SQL until the issue is fixed.
Alright, thank you!