Median Forumla Question

Hello, wondering if anyone could give advice on the following:

i have a table of incidents, with column of account name and the incident id

incident1, account1
incident2, account1
incident3, account2

I want to do a count of incidents by account and then return the median of those values.

(total incidents, account1), (total incidents, account2), (total incidents, account 3)

if the values looked like


I'd want to return the median of 4.

Is there anyway to write a formula like this?

I was calculating the average per client, but there's such a discrepancy with my larger clients, i need to switch to median

What i was using to calculate the average:
unique_count(incident.investigationId, kql='not incident.category : "job" ') / unique_count(incident.account)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.