NPS calculation : For date and till date

avicric

Board Regular
Joined
Apr 24, 2017
Messages
59
Office Version
  1. 2019
Platform
  1. Windows
Hi all,
Need help to get For date and till date NPS score....

Example :
For DateTill Date
DatePromoterDetractorPassivetotal responseNPS scoreNPS score
1​
10​
3​
1​
14​
50
50​
2​
20​
1​
5​
26​
73
65​
3​
5​
6​
0​
11​
-9
49​
total
35​
10​
6​
51​
49
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Try something like:
Book1
ABCDEFG
1DatePromoterDetractorPassivetotal responseDaily NPSRunning NPS
211031145050
322015267365
4356011-949
5Total351065149
Sheet1
Cell Formulas
RangeFormula
E2:E4E2=SUM(B2:D2)
F2:F4F2=ROUND(([@Promoter]-[@Detractor])/SUM(NPSData[@[Promoter]:[Passive]])*100,0)
G2:G4G2=ROUND((SUM($B$2:$B2)-SUM($C$2:$C2))/SUM($B$2:$D2)*100,0)
B5B5=SUBTOTAL(109,[Promoter])
C5C5=SUBTOTAL(109,[Detractor])
D5D5=SUBTOTAL(109,[Passive])
E5E5=SUBTOTAL(109,[total response])
F5F5=ROUND((NPSData[[#Totals],[Promoter]]-NPSData[[#Totals],[Detractor]])/SUM(NPSData[[#Totals],[Promoter]:[Passive]])*100,0)
 
Upvote 0
Try something like:
Book1
ABCDEFG
1DatePromoterDetractorPassivetotal responseDaily NPSRunning NPS
211031145050
322015267365
4356011-949
5Total351065149
Sheet1
Cell Formulas
RangeFormula
E2:E4E2=SUM(B2:D2)
F2:F4F2=ROUND(([@Promoter]-[@Detractor])/SUM(NPSData[@[Promoter]:[Passive]])*100,0)
G2:G4G2=ROUND((SUM($B$2:$B2)-SUM($C$2:$C2))/SUM($B$2:$D2)*100,0)
B5B5=SUBTOTAL(109,[Promoter])
C5C5=SUBTOTAL(109,[Detractor])
D5D5=SUBTOTAL(109,[Passive])
E5E5=SUBTOTAL(109,[total response])
F5F5=ROUND((NPSData[[#Totals],[Promoter]]-NPSData[[#Totals],[Detractor]])/SUM(NPSData[[#Totals],[Promoter]:[Passive]])*100,0)
Thank you Misca...
But i was looking for a measure for these....
 
Upvote 0
DAX measure? My bad.

DAX measures are a bit more tricky to write / understand without seeing the datamodel. I created a super simple model by unpivoting the Promoters, Detractors and Passives to a Role column and the values to a Score column. I also changed the Dates to actual dates. This way my Facts table ("Scores") had three columns and I created a date table which was connected to the Date column of my fact table.

Then I created a few helper measures and the actual NPS measures:
Code:
Total Responses:=sum(Scores[Score])
Promoters:=CALCULATE([Total Responses],Scores[Role]="Promoter")
Detractors:=CALCULATE([Total Responses],Scores[Role]="Detractor")

NPS:=ROUND(DIVIDE([Promoters]-[Detractors],[Total Responses])*100,0)

Running NPS :=
VAR DataEndDate =
    MAX ( Scores[Date] )
VAR EndDate =
    MIN ( MAX ( 'Calendar'[Date] ), DataEndDate )
VAR DateRange =
    FILTER ( ALLSELECTED ( 'Calendar' ), 'Calendar'[Date] <= EndDate )
RETURN
    CALCULATE ( [NPS], DateRange )
Hide at least the Date and Score columns from the fact table and use the Date table to filter the dates.
 
Upvote 0
Solution
DAX measure? My bad.

DAX measures are a bit more tricky to write / understand without seeing the datamodel. I created a super simple model by unpivoting the Promoters, Detractors and Passives to a Role column and the values to a Score column. I also changed the Dates to actual dates. This way my Facts table ("Scores") had three columns and I created a date table which was connected to the Date column of my fact table.

Then I created a few helper measures and the actual NPS measures:
Code:
Total Responses:=sum(Scores[Score])
Promoters:=CALCULATE([Total Responses],Scores[Role]="Promoter")
Detractors:=CALCULATE([Total Responses],Scores[Role]="Detractor")

NPS:=ROUND(DIVIDE([Promoters]-[Detractors],[Total Responses])*100,0)

Running NPS :=
VAR DataEndDate =
    MAX ( Scores[Date] )
VAR EndDate =
    MIN ( MAX ( 'Calendar'[Date] ), DataEndDate )
VAR DateRange =
    FILTER ( ALLSELECTED ( 'Calendar' ), 'Calendar'[Date] <= EndDate )
RETURN
    CALCULATE ( [NPS], DateRange )
Hide at least the Date and Score columns from the fact table and use the Date table to filter the dates.
Awesome!!!!
Thanks you for taking the time....
⭐⭐⭐⭐⭐
 
Upvote 0

Forum statistics

Threads
1,225,360
Messages
6,184,506
Members
453,236
Latest member
Siams

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top