Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
TomLU123
Helper III
Helper III

Show 0 instead of blank for completion rate

Dear experts,

 

I am using measures to get the completion rate of a satisfaction survey. Some locations (title in the table) got no responses, and the completion rate shows blank. Is iit possible to show 0 in both "Responses" and "Completion Rate" instead of blank?

 

2018_05_03_10_28_28_DTA_Hiring_Manager_Satisfaction_Report_2_Power_BI_Desktop.jpg

 

Here are the formulars I am using:

Total Number of Responses = COUNT('Overall Result'[Response ID]) 

Total Number of Hiring Managers = COUNT('Hiring Manager List'[Hiring Manager Name])

Completion Rate = [Total Number of Responses]/[Total Number of Hiring Managers]

 

Many thanks!

 

Best regards,

Tom

5 REPLIES 5
Phil_Seamark
Employee
Employee

Hi @TomLU123

An easy thing to try that works in some scenarios is to just add a +0 to the end of the calculation

 

eg..

COUNT('Overall Result'[Response ID])  +0

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hi Phil, @Phil_Seamark

 

Yes, it works! Thank you so much!

I have changed the fomular to COUNT('Overall Result'[Response ID]) +0

 

Just another question, how can we show 0 instead blank in the "Responses" column?

2018-05-03 10_59_38-DTA Hiring Manager Satisfaction Report (2) - Power BI Desktop.png

 

Many thanks!

 

Best regards,

Tom

Did you add a +0 to the end of the calcuation for the measure used for the Responses column?


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Hi Phil, @Phil_Seamark

 

Yes, the current formulars are like this:

Total Number of Responses = COUNT('Overall Result'[Response ID])+0

Total Number of Hiring Managers = COUNT('Hiring Manager List'[Hiring Manager ID])

Completion Rate = [Total Number of Responses]/[Total Number of Hiring Managers]

 

Is it because the setting of the visualization?

 

Many thanks!

Best regards,

Tom

Hi @TomLU123

 

It can be more complex than that.  Sometimes, if you simply have no data for an intersecting combination of fields, the calculation simply won't even run, so there is nothing for you to add the +0 trick to.

 

Although it should be ok with the COUNTROWS function.  I notice your calculations are using data from multiple tables.  I would be helpful to understand more about your data model to provide a better suggestion.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.