03 Oct 2024 07:16 AM - edited 03 Oct 2024 07:32 AM
I have multiple metrics and I want to combine those records into a pie chart in a Dashboard. How to achieve this with DQL using timeseries. Pie or Dougnut anything works. I am trying to combine the total value of timeseries Data like this
timeseries metirc= sum(metirc)
| fieldsAdd metirc.single_value = arraySum(metirc)
but this does not allow me to convert to pie or doughnut.
Also, for combining 3 metrics I am using
timeseries { metric1 = sum(log.metric1), metric2 = sum(log.metric2), metric3 = sum(log.metric3) }
| fieldsAdd metric1 = arraySum(metric1)
| fieldsAdd metric2 = arraySum(metric2)
| fieldsAdd metric3 = arraySum(metric3)
| fields metric1,metric2,metric3
Is it possible by anyway to convert this to pie or doughnut visualisation where I want to see the total area of pie as total of metric1, metric2 and metirc3 and each slice represented in different colour.
Something like this.
Solved! Go to Solution.
03 Oct 2024 10:10 PM
What if you try to create the tile using the Data Explorer, then open the result with Notebook, using the "Open With" function?
04 Oct 2024 05:11 AM
Hey Maheedhar,
For donut charts you need to have each metric in it's own record. If you are using multiple different metrics the best way to achieve this is with append as seen below. To get the total to show in the middle, use the pie settings as seen on the right.
Otherwise, if it's 1 metric but each section in the donut is a different dimension then this can be achieved just by splitting the metric as seen below.
Based on your original post, I would say the first example best fits. Hope this helps!
04 Oct 2024 05:42 AM
Thanks @Fin_Ubels ,
The first method suits and worked like magic. 🙂
18 Oct 2024 06:13 PM
Is there a way to see in donuts 2 dimension in the same slice?
19 Oct 2024 05:55 AM
No but categorical bar chart allows to show categories and subcategories
08 Oct 2024 06:39 AM - edited 08 Oct 2024 06:40 AM
Or you can also use "Explore metrics" for this like.
using split by + reduce to single value