Create visualize builder gauge using conditional value from document

I'd like to dynamically set the value for the gauge according to the source data. How do I access the source data that has a variable named 'func'. Appreciate your advice.

if (params._source['func'] == 'secret1') {
params.A / 1
} else if (params._source['func'] == 'secret2') {
params.A / 10
} else {
params.A / 100
}

Conditionals will come to Lens formula in 8.6:

1 Like

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