Hi Team,

I feel like this is pretty easy and I’m getting stuck on something trivial. Apologies!

Ultimately I want to show a KPI card with the median number of views per user by product in a period (can be aggregated to each month if it can’t just use a date filter).

I have a table with attributes like so:

- user id
- event
- product
- event timestamp

So, for example, if the product was B, and we had 20 distinct users, we would sum the number of views each user had in that date period, and then take the median out of all users for the product(s) selected. That number would display in the KPI card.

I thought I would create 3 calculated fields:

- userView: if event = [view event] then 1 else 0
- userViewCount: sum(userView)
- medianUserView: median(userViewCount)

I get an error each time I try to get medians from a calculation with aggregation - count/sum etc…

Any help would be appreciated - thanks!