Calculate percentage by each row on grand total

  • What Grafana version and what operating system are you using?

  • 10.2.6

  • What are you trying to achieve?

  • I am trying calculate the % over the grand total
    |Team Name| Total Count | % of Employees by Team

|— | — | — | —|

|Team Name| 200 | (200/1100)*100 | |

|HR Team | 400 | (400/1100)*100 | |
|BSA Team | 500 | (500/1100)*100 | |

  • How are you trying to achieve it?
    I am trying the transformation Add fields from calculation and Mode is binary

  • What happened?

  • I am not able to calculate % over (Grand total /Total Count)*100

  • What did you expect to happen?
    I want to calculate % over grand total, as shown here Team Name/

  • Can you copy/paste the configuration(s) that you are having problems with?

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.
    No

  • Did you follow any online instructions? If so, what is the URL?

  • Yes

which visualization are you using?

I am using table

1 Like

Hi yosiasz,
I am using table

1 Like

what would the final result look like when what you need is implemented?

Hi [yosiasz]
Something like below each row should calculate % by Grand Total.
Taking first row example Round((100/700*)100,2)

you can use transformations to get that but might be better to do it on datasource

what is your data source? mysql?

My Data source is Loki logs. I want to do this with Transformations only. Let me know how do I do it.

Hi [yosiasz]
Do you have solution for this?