Having Trouble Calculating Percentages

Hello

I am having trouble in calculating percentage using influxql/grafana

please suggest
i want to achieve some thing like below

(pointsWrittenOK*100)/(pointsWrittenDropped+pointsWrittenFailed+pointsWrittenOK) from measurement influxdb_http

i tried below also it didnt work
(pointsWrittenOK.value*100)/(pointsWrittenDropped.value+pointsWrittenFailed.value+pointsWrittenOK.value) from measurement influxdb_http

Can some one suggest me ?