TSVB markdown with conditional values

Hi,

We're looking to create in our dashboard a markdown using the TSVB control type. Our dashboard has controls for filtering purposes.

We would like the markdown to display different predetermined numerical values based on the user's selections in our dashboard's controls.

Is this possible ? I looked at the handlebars documentation and I don't see any built-in support for conditional comparisons (i.e.: if user selects 'X' in control A and 'Y' in control B, then display predetermined numerical value 'Z' in the markdown).

If it's not possible, what alternatives do we have ? I was thinking of maybe exposing those numerical values in Elastic documents. User selection in the controls would filter the returned documents, ensuring we fetch those with the numerical values we want displayed in the markdown.

Thanks

Markdown as a visualization is not really made to be filtered. Your alternative could work, but not with a markdown, but with a saved search that will only show the document that matches your values.

That's what I had in mind when suggesting my alternative, I believe it could work with a markdown ?


We have documents with fields F1 and F2.

A control on our dashboard filters F1.

For all documents with value A for F1, B would be returned for F2.

For all documents with value C for F1, D would be returned for F2.

etc.

F2 holds essentially a constant value for all documents matching a particular value for F1.

The markdown would be configured to have a variable obtained through a "Top Hit" aggregation of 1 on F2.

The markdown would display that variable.


You mention using a saved search, how exactly would that work in the context of displaying text to the user ? (if markdowns can't be used)

Thanks

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