Splunk Search

Calculate NPS (Net Promotor Score)

tzvikaz
Explorer

Data is events with a date, username, company,  score.

I want to calculate an NPS score by company.

detractors = scores 1-6

passive = score 7-8

promoters = score 9-10

NPS=%promoters-%detractors

 

Help would be highly appreciated.

 

 

Labels (1)
0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

It would help to know what you've tried so far, but perhaps this will help.

<<your search>>
| eval detractor=if(score<7, 1, 0), promoter=if(score>8, 1, 0)
| stats count, sum(detractor) as detractors, sum(promoter) as promoters by company
| eval NPS = (promoters*100/count) - (detractors*100/count)
---
If this reply helps you, Karma would be appreciated.

View solution in original post

richgalloway
SplunkTrust
SplunkTrust

It would help to know what you've tried so far, but perhaps this will help.

<<your search>>
| eval detractor=if(score<7, 1, 0), promoter=if(score>8, 1, 0)
| stats count, sum(detractor) as detractors, sum(promoter) as promoters by company
| eval NPS = (promoters*100/count) - (detractors*100/count)
---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...