Question

# Net Promoter Score calculation

• 2 replies
• 180 views

• 0 replies

Hello Looker community,

I am looking for help in producing a visualization that displays the Net Promoter Score for one of our digital properties.

In Looker, I have a column that, for each row, contains either “Detractor,” “Passive,” or “Promoter” as a value. I was able to use a table calculation to find the percentage of the total for each one of those categories. So in the “Results” section of “Data” tab in Edit Tile, there are three columns: the rating category, the total count per category, and the percentage of the total, with the second column hidden from the visualization.

Now I want to subtract the percentage of “Promoter” from “Detractor,” arriving at a final numerical value. But I can’t quite figure out how to create a table calculation that produces it.

### 2 replies

Following this.

I know this is an old post, but I think you’ll want to utilize “offset” in your table calc to use values from multiple rows in your calculation.

If your goal is to product a single NPS value and hide the rest of the data, and assuming you always only have these 3 ratings, you could use an approach like the one shown below

 Rating (Sort Desc) Count Percentage of Total Net Promoter Score Promoter 7 47% if(row()=1, percentage_of_total - offset(percentage_of_total,2), null) Passive 5 33% Detractor 3 20%