Pie Chart with "count of" string values instead of real numeric values in the records

Grafana version V8.2.4 operating system MacOS 12.1

I have an Infinity data source (JSON) that gives me device records
I would like to have a pie chart telling me that in my records I have 30 devices from wich there are 20 iPads, 5 iMacs, 2 Apple-TV and 3 MacBooks as the individual pies.
So have the number of devices of a kind be the value for each slice

I do not know what to use in the “Calculation” “Distinct count” does not really help

i have one chart filled 100% in the same color and the legend shows “model value 30”

welcome to the :grafana: forum, @jackk

I think the community has the best chance of helping if you can share either:

  • A screenshot of your data as it appears in the table visualization
  • your raw unformatted data from the inspect drawer

The “class” that is used is:
class
Mac
iPad
iPad
Mac
appletv

As the calculation i used:
Bildschirmfoto 2021-11-10 um 10.22.12

What I try is the 100% = 5 Devices of wich I have 2 Mac (40%), 2 iPads/(40%) and 1 Appletv (20%)