firstValue PRE_FILTER

I need to calculate the firstValue in my data source PRE_FILTER.
I can get the firstValue function to work but need to avoid the value changing once table filters are applied.

As far as I’m aware, I can’t use the level-aware PRE_FILTER with firstValue.

In my specific example, I’m trying to return the first team (string) for each person (string) ordered alphabetically.
firstValue(team,[team ASC],[name])

Any thoughts or workarounds?

Currently there is no option for that. You might look at doing a rank or something like this?

firstValue
(
avg(avgOver({interaction_hold_time},, PRE_FILTER)),
[ {agent_ConnectedToAgentTimestamp} ASC ]
)

Where you can try and get the pre filter of a numeric and pass that into the firstValue?

I don’t know if this will work at all but just brainstorming.

Were you able to find a way to achieve this?

No. I went back and created a new dataset with custom sql.

1 Like