I have a column in data which contain 1000 row and values are 0 and 1 , how i can calculate percentage and show on gauge. for example 750 rows have 1 than percentage is 75

Hi @akshay_bhardwaj ,

I think you can use Lens formula for this use case:

```
sum(my_field) / count()
```

and set the data format to percentage.

What version of the stack are you using?

The one you've opened is the Aggregation based editor, while formula is available in the Lens editor.

You are correct, there are no half circle gauges in Lens, only vertical and horizontal ones.

If you really need semi-circle gauges, the only solution I can think of it TSVB:

- Select the Gauge visualization
- Configure a
`Count`

aggregation, then add a new aggregation - Configure a
`Sum`

aggregation, then add a new aggregation - Configure a
`Math`

aggregation, then configure two variables:`count`

for the`Count`

metric, and`sum_metric`

for the`Sum`

metric- Type
`params.sum_metric / count`

in the Math text field.

- Type
- In the
`Options`

panel ( on top of the panel, next to`Metrics`

) pick the`Percentage formatter`

Thanks Marco can you please me more to add percentage sign % after value and round up decimal values

Thanks Marco for you quick response.....

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