Forum Discussion

aggarwal25's avatar
aggarwal25
Frequent Visitor
8 years ago
Solved

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...
  • Greg_Deckler's avatar
    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)