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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Jumper
Helper I
Helper I

Percentage - how to default a blank to 0%, rather than 100%?

Hi.

 

I'm trying to clean up a sheet I have inherited from my predecessor.
It involves a very basic Dax formula that the company uses to calculate staff productivity:

Productivity =
DIVIDE(
|     SUM('Employee_Hours'[Job_Hours]),
|     SUM('Employee_Hours'[Hours_Rostered)
) + 1

The problem with this formula is that if an employee has registered zero hours, then their productivcity defaults to 100%.  0% would be the preferred default, if that is possible. 

My dax skills are pretty basic that a solution immediately jumps out at me here - is there a better way to write this formula?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Jumper ,

 

Try to modify your formula like below:

Productivity = 
IF(
    SUM('Employee_Hours'[Hours_Rostered]) = 0,
    0,
    DIVIDE(
        SUM('Employee_Hours'[Job_Hours]),
        SUM('Employee_Hours'[Hours_Rostered])
    )
)

vkongfanfmsft_0-1725611807033.png

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Jumper ,

 

Try to modify your formula like below:

Productivity = 
IF(
    SUM('Employee_Hours'[Hours_Rostered]) = 0,
    0,
    DIVIDE(
        SUM('Employee_Hours'[Job_Hours]),
        SUM('Employee_Hours'[Hours_Rostered])
    )
)

vkongfanfmsft_0-1725611807033.png

Best Regards,
Adamk Kong

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Brilliant - this works perfectly.

Thank you so much, and sorry for a slow reply (had a few days off!).

Jumper
Helper I
Helper I

Here's a screenshot if that helps explain a little better:

Capture.PNG

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.