Metric to Count Unique Text Values


Is there a way to create a metric that is the count of unique text values in field1 during the last 14 days? Our specific example is to have a metric that is the count of unique employees that have handled transactions by a customer in the last 14 days

We know that we can create an actionDecl to calculate this metric, but ideally, we could use a function in ExpressionEngineFunction to create this (i.e., window( ‘COUNT’, unique(data.field1), -14, 14). Is there a way to add a custom ExpressionEngineFunction if this doesn’t already exist?



The problem is the “last 14 days”. Currently the metrics engine supports DAY, WEEK, MONTH etc, but not 14 days.

Unique text values in a single day shoudl be very easy. just use the expression “unique(textField)” in your tsDecl metric.



Not sure WEEK is supported actually… see c3ShowType(Interval)