Forum Discussion

JMalan's avatar
JMalan
New Member
2 years ago
Solved

Calculating Percentage excluding blanks

I am very new to PowerBI. I am trying to calculate the percentage of times our customers give us a satisfaction rating of "Great".

 

I have created the following measure. It works, but it is returning blank results as zero, and I need them to not be counted. Can someone help me exclude blank results?

 

CSAT Percentage = DIVIDE(

CALCULATE ( COUNTROWS( HelpScout_Table ), HelpScout_Table[Ratings] = "Great" ) ,

CALCULATE ( COUNTROWS( HelpScout_Table ), ALL ( HelpScout_Table[Ratings] ) ))
 
Thank you in advance!
 
Jeremy
  • I figured it out. For anyone else looking for this solution, here is what worked for me.

    CSAT Percentage =
    DIVIDE(
        CALCULATE ( COUNTROWS( HelpScout_Table ), HelpScout_Table[Ratings] = "Great" ) ,
        CALCULATE ( COUNTROWS( HelpScout_Table ), ALL ( HelpScout_Table[Ratings] ), HelpScout_Table[Ratings] <> BLANK() ))

1 Reply

  • I figured it out. For anyone else looking for this solution, here is what worked for me.

    CSAT Percentage =
    DIVIDE(
        CALCULATE ( COUNTROWS( HelpScout_Table ), HelpScout_Table[Ratings] = "Great" ) ,
        CALCULATE ( COUNTROWS( HelpScout_Table ), ALL ( HelpScout_Table[Ratings] ), HelpScout_Table[Ratings] <> BLANK() ))