All Apps and Add-ons

Calculating percentage of data in a table

Kendrick33
Explorer

I have a table with different types of data that has been age off. I know how get a sum of the data in each row by doing the following: chart sum(Rows) by Table

I know how to get the total of all the rows by the following: chart sum(Rows).

What I'm trying to do is get the percentage of each type out of the total number of rows

So if data types were

abc 100 cde 25 efg 25

how would I do this?

Tags (1)
1 Solution

Kendrick33
Explorer

Each item is written on its separtate line ex. (Table=ABC Deleted Rows=50) I can get the sum off all the data. The problem has been trying to store each item by Table type.

what I had was

stat sum(Rows) as AllAgedOff | stats sum(Rows) by Table) which will result in NO RESULTS FOUND.

If I can store each Table type, the math should be no problem. The results will be each value by Table type divided AllAgedOff multiplied by 100.

View solution in original post

0 Karma

Kendrick33
Explorer

Each item is written on its separtate line ex. (Table=ABC Deleted Rows=50) I can get the sum off all the data. The problem has been trying to store each item by Table type.

what I had was

stat sum(Rows) as AllAgedOff | stats sum(Rows) by Table) which will result in NO RESULTS FOUND.

If I can store each Table type, the math should be no problem. The results will be each value by Table type divided AllAgedOff multiplied by 100.

0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...