Getting Data In

How to calculate Percentage and Percent difference week by week?

wanda619
Path Finder

Hi community,

I am stuck on a problem where i have to calculate percentage and Percent Difference. 

 

I have 3 columns, for example -- 

Name |  Errorcode |  Result

abc     |   324   |   5

abc     |    999 |   1

abc     |  Total |    6

I want the output to look like this -- 

Name |  Errorcode |  Result | Percent of Total |  Percent Difference ( week over week)

abc     |   324   |   5 |     83.33 | 25

abc     |    999 |   1 | 16.67 |  100

abc     |  Total |    6 | 100 |  100 

for Percent Difference (week over week) should look at the errors for that Name from the prior week and understanding the percent difference to this week.  Example, if there were 3 1027 errorcodes last week and 6 1027 errors this week the percent difference would be 100%. 

Tags (1)
0 Karma
Get Updates on the Splunk Community!

Index This | Why did the turkey cross the road?

November 2025 Edition  Hayyy Splunk Education Enthusiasts and the Eternally Curious!   We’re back with this ...

Enter the Agentic Era with Splunk AI Assistant for SPL 1.4

  🚀 Your data just got a serious AI upgrade — are you ready? Say hello to the Agentic Era with the ...

Feel the Splunk Love: Real Stories from Real Customers

Hello Splunk Community,    What’s the best part of hearing how our customers use Splunk? Easy: the positive ...