Skip to main content
Skip table of contents

Configurations tips

Filter by date parameter

It is common to want to filter data by date, for example, by having this type of parameter in dashboards:

Screenshot 2024-10-02 at 16.28.16.png

This parameter can then be used for example for the count of instances for the Concept A, such as counting instances created within a specific year: for 2024, only the instances created in 2024 needs to be taken into account, etc.

In order to do it, the following steps can be followed:

  • Create a concept Years:

    • Create a date field, with the correct granularity. (the name of the field will be Date Year to continue the example).

    • Use only this field for the concept chip representation.

    • Create the needed instances.

  • Create a multidim (Concept A x Years) boolean field. The name of the field will be Is created this year ? to continue the example.

    • Have for Input1: Concept A > Dimension > Created At and for Input2: Years > Dimension > Date Year.

    • The formula can then be:

CODE
IF(OR(COUNT(Input1)=0, YEAR(Input2)=YEAR(Input1)), TRUE, FALSE)

(By having the condition COUNT(Input1)=0, if the dimension Years is empty, then the formula will return TRUE. This is useful for example in the Dashboard when no instance is selected for the parameter Years, for taking into account all the instances, regardless the Created At date).

  • Use the multidim field to filter the instances.

    • In the formula counting the number of instances of Concept A, add the dimension Years.

    • In the filter of Input: Concept A > All instances, create a filter that use the field Is created this year ? with the proper mappings:

Screenshot 2024-10-02 at 16.45.07.png
  • Add a new parameter Years in the Dashboard:

    • Use the concept Years for that parameter.

  • Use the parameter Years for mappings in Dashboard widgets.

By following these steps, data can be filtered by date via a parameter in a dashboard.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.