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!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...