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!

New Cloud Intrusion Detection System Add-on for Splunk

In July 2022 Splunk released the Cloud IDS add-on which expanded Splunk capabilities in security and data ...

Happy CX Day to our Community Superheroes!

Happy 10th Birthday CX Day!What is CX Day? It’s a global celebration recognizing innovation and success in the ...

Check out This Month’s Brand new Splunk Lantern Articles

Splunk Lantern is a customer success center providing advice from Splunk experts on valuable data insights, ...