Forum Discussion
aggarwal25
8 years agoFrequent Visitor
NPS calculation at Company level
Hi All, I am calculating NPS using the follwing: Relationship NPS = var NumOfRespon= CALCULATE ( COUNTA ('Survey Response'[Relationship Likely to Recommend-Value]),FILTER('Survey Response', 'Su...
- 8 years ago
Really difficult to decipher what you are doing there, but if sometimes you return a blank when you really want to return 0, then this should work:
Relationship NPS = var NumOfRespon= CALCULATE ( COUNTA ('Survey Response'[Relationship Likely to Recommend-Value]), FILTER('Survey Response', 'Survey Response'[Relationship Likely to Recommend-Value] <> BLANK() || 'Survey Response'[Relationship Likely to Recommend-Value] = 0 ) ) VAR thebombdiggedty = (CALCULATE(COUNTA('Survey Response'[Survey Name]),FILTER('Survey Response','Survey Response'[Relationship NPS Distribution]="Promoters"))/NumOfRespon-CALCULATE(COUNT('Survey Response'[Survey Name]),FILTER('Survey Response','Survey Response'[Relationship NPS Distribution]="Detractors"))/NumOfRespon) *100 RETURN IF(ISBLANK(thebombdiggedty),0,thebombdiggedty)
Greg_Deckler
8 years agoCommunity Champion
Really difficult to decipher what you are doing there, but if sometimes you return a blank when you really want to return 0, then this should work:
Relationship NPS =
var NumOfRespon=
CALCULATE (
COUNTA ('Survey Response'[Relationship Likely to Recommend-Value]),
FILTER('Survey Response', 'Survey Response'[Relationship Likely to Recommend-Value] <> BLANK() || 'Survey Response'[Relationship Likely to Recommend-Value] = 0 )
)
VAR thebombdiggedty = (CALCULATE(COUNTA('Survey Response'[Survey Name]),FILTER('Survey Response','Survey Response'[Relationship NPS Distribution]="Promoters"))/NumOfRespon-CALCULATE(COUNT('Survey Response'[Survey Name]),FILTER('Survey Response','Survey Response'[Relationship NPS Distribution]="Detractors"))/NumOfRespon) *100
RETURN IF(ISBLANK(thebombdiggedty),0,thebombdiggedty)
- aggarwal258 years agoFrequent Visitor
Thank you Greg_Deckler. This worked.