Skip to content

Provide count distinct functionality #265

Description

@TheCaffinatedDeveloper

We have been loving the ZEN rules engine and it's ease of use. The javascript function "escape hatch" is quite nice and allows for some extensive capabilities. I will say however, the ability to count distinct elements in an array would be much appreciated.

My recommendations: if the element in the array is a "zen primitive" such as number, date, string etc it should be fairly straightforward (and perhaps that's the first support). If its a context then the user could provide a callback that returns a string of concatenated properties that make this context unique etc.

I know this can be done using javascript functions but it would be nice to be able to do count_distinct([date, date, date]) out of the box to calculate number of distinct dates for example. Or len(distinct([date, date, date]))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions