Add Field in Filters Dashboard Charts

Hi,

How we can Add Field ( I want to create calculated Field for filter my dashboard ) ?

image

Thanks

Hey @Jonathan_Gautier - unfortunately this is a gap in the product at the moment - you can’t add dashboard filters on fields that are not part of the data source. We do plan on addressing this in the future, but it is possible to workaround it.

You need to add a pipeline to your data source that contains the missing field. One option is to put the actual calculated field definition directly into the data source pipeline, which would mean you no longer need to add it explicitly to each chart.

Alternatively if you’d prefer to keep the calculated fields as they are, you could create a dummy calculated field in the data source pipeline, e.g.

[ { $addFields: { fieldName: 0 } } ]

That would make the field show in the data source with the correct type, and you could add a dashboard filter - but your calculated fields would overwrite the dummy value. Once the filter was added to the dashboard, you could remove the pipeline from the data source.

Apologies for the need for a clumsy workaround, but hopefully that’s better than having no workaround at all :slight_smile:

Tom

3 Likes

Thanks for your help, i have find where to add my pipeline :slight_smile:

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.