SUMIF on query builder

Hi there!
Is there a way to perform a SUMIF without using SQL? That would be very useful to calculate shares (eg how much parner A sales represent over the total sales?)

Hi @lucas.lima
Not currently. Isn’t SUMIF an Excel function?
I would guess you’re talking about something like SUM(CASE WHEN ... THEN ... ELSE ... END) or SUM(IF(..., ..., ...))?
https://github.com/metabase/metabase/issues/3990
https://github.com/metabase/metabase/issues/6331

Yeah, it is. I was talking about the concept, though.
In MySQL, I do SUM(IF(condition, value_to_sum, 0)) and my intention would be doing the same via query builder, precisely to let my users calculate share via one question, rather than calculation the total, and then fitlering and calculation the other number. I just thought the keyword SUMIF would lead to quicker results, but I guess I was wrong lol

Upvoted issues, thanks!