- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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])
)
)
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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])
)
)
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Brilliant - this works perfectly.
Thank you so much, and sorry for a slow reply (had a few days off!).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here's a screenshot if that helps explain a little better:

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
05-03-2024 07:18 AM | |||
03-06-2024 04:08 AM | |||
Anonymous
| 11-22-2018 01:49 AM | ||
12-05-2023 05:25 PM | |||
06-24-2024 07:25 AM |
User | Count |
---|---|
14 | |
12 | |
11 | |
10 | |
9 |