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!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...