Pie chart for single "category" variable

I want to create a graph that aggregates a “category” variable type. For example, I have an “error” category that could be one of any list of errors. Lets say, every “state” sends the “error” variable with either “ok” or “error 1” or “error 2”.

Is there a graph or any way I can setup an aggregation to count how many appearances of each unique value are on a timeframe? I know I can do some different aggregations for number variables such as mean, max, min, first, etc. But my variable is of type string and I just want to see the percentage of each unique value on the last 30 days.

Hey @Braian_Pita,

We have an aggregation that’s fairly close to what you’re looking for called Time At Value. It doesn’t calculate the number of times a specific value was reported, but it does calculate the amount of time (in milliseconds) an attribute was equal to a specific value. Using that aggregation on the Pie Chart might give you the visual you’re looking for. You would set up multiple series all using the same attribute, but different Time At Value configurations. This would result in a pie segment for each possible category value reported to your attribute.

If you do require the specific counts, you’ll have to use the Custom HTML Block to create a custom visual. That block supports querying Time Series Data with no aggregations. This way you’ll get every data point and you can count the values inside the block’s code.