# QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Today
cancel
Showing results for
Did you mean:
Highlighted Not applicable

## Calculate the NPS

Dears,

I want to calculate the NPS.

In our customer satisfaction survey we ask our customers to give us a grade of 1 to 10. If the customer give us a grade of 1-6 he is considerated DETRACTOR, if he gives us a grade of 7 or 8 he is NEUTRAL, and if the grade is 9 or 10 he is a PROMOTER.

So, basically, the NPS is the ((% OF PROMOTERS) - (% OF DETRACTORS)).

I'm using the formula:

=((Count({\$<[NPS]=[NPS]*{">=9"}>}[NPS]))-(Count({\$<[NPS]=[NPS]*{"<=6"}>}[NPS])))/count([NPS])

Is it right?

Thanks

3 Replies
Highlighted Not applicable

## Calculate the NPS

I would probably determine their NPS on the data load for each survey record and then the expressions become much easier. You could either store in 3 separate fields (Promoter, Neutral, or Detractor) with a value of 1 in the respective field for each record or in a single field (NPS) where you store either Promoter, Neutral, or Detractor.

/Kevin

Highlighted Not applicable

## Calculate the NPS

Honestly I don't know what the * means in your set analysis but I would just do:

`=(Count({\$<[NPS]={">=9"}>}[NPS])-Count({\$<[NPS]={"<=6"}>}[NPS]))/count([NPS])`

But I don't think that's necessarily the "right way". Imagine if you have two fields, [Account Number] and [Total Amount Billed]. If you want to know how many different customers have been billed, you would do count([Account Number]) or count(distinct [Account Number]). You wouldn't want to do count([Total Amount Billed]) and you can't do count(distinct [Total Amount Billed]). I guess the reason for this is if you have duplicate data somewhere in there it is going to be counted twice and you can't use distinct. That being said, you should probably count some ID instead of NPS (which is similar to Total Amount Billed in the example I gave).

Highlighted Not applicable

## Calculate the NPS

Everything I said above assumes that NPS is a field with a value between 1-10 for each customer which it probably is, but it's slightly confusing that you want to calculate NPS and you already have a field called NPS so I'm not 100% sure.