# Calculate percentage of records_total per namespace

Hello,

I would like to get the percentage of logs per namespace.
I can get the total record by namespace with:
`sum by (exported_namespace) (fluentd_kube_input_status_num_records_total)`

But can not get the percentage from total logs, i tried this but is not correct:
`sum by (exported_namespace) (fluentd_kube_input_status_num_records_total) / sum(fluentd_kube_input_status_num_records_total)`

Any guidance on how to calculate the percentage given records_total and what am I doing wrong, or how I could troubleshoot?