Get Percentage of two different SUM

I have a problem and I do not know how to solve it. I hope you can help me
I have an index with thousands of documents. These documents have dozens of fields by which they can be filtered. In addition, one of these fields is an amount (IMP Field) and another, a field that indicates the type of document (two possible values: Type A and type B).

I need to get the percentage of the amount of type B documents in relation to the amount of type A documents.
That is to say (SUM (IMP of type B) / SUM (IMP of type A)) * 100
For example:
---------------------TYPE ----------- IMP
Document 1----- A -------------15
Document 2 ---- A -------------25
Document 3 ---- B ------------- 7
Document 4---- B ------------- 2
Document 5 ---- B ------------- 1

The percentage I want to obtain is:

SUM (IMP of type B) / SUM (IMP of type A)) * 100
(10/40) * 100 = 25%

What kind of graph can I use? how?

I think that the ideal graphics for this case are Gauge and Goal with the defined range of 0 to SUM (IMP of type A) .. but it is not possible to use dynamic ranges.

Thank you

1 Like

nobody can help me?

Make a pie chart and select the SUM metric on the IMP field. Then under bucket select term and pick TYPE as the field.

That should give the the percentage of A/B based on the total of IMP.

To get the percentage of SUM A and SUM B, maybe you can do that with a scripted field? I don't think there is a visualization that can do what you want out of the box.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.