COUNT IF

Hi guys,
Any recommendation on approaching the equivalent to the excel formula:
COUNTIF(range_of_numbers,'>5')/COUNT(range_of_numbers)

Goal: count the % of numbers about the value 5

Here's my current approach
Using library addon the math lib are limited to count. 
• So I'd need to do an add-on search WHERE range_of_numbers>5 only, then do the COUNT of that.
• Then another add-one search with all range_of_numbers, then do the COUNT of that.
• Then finally use both variables in my API call to then update a variable to do the division math, to get the final percentage (or do it frontend).


Would there be a better/simpler way?

Thanks!
Other
3 replies