Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi
I'm having a few problems with the NaN and Infinity errors on a calculation field, I believe the solution is to use the DIVIDE function but I'm having problems getting this to work.
This is the current calculation:
Utilisation = CALCULATE([productive_time]/([WorkingHours]-[non_productive_time]))*100
Is it possible to rewrite this as a DIVIDE or do I need to create a new calculated field for "WorkingHours - non_productive_time?
Thanks for any help.
Mick
Solved! Go to Solution.
@micklowe Hey,
you can write your dax like this.
Utilisation =
Var _a = [productive_time]
VAR _b=( [WorkingHours]-[non_productive_time])
return
= divide(_a,_b,0)*100
you can try above dax.
Thanks
Harish M
Thanks Harish, this worked perfectly, I did have to remove the equals sign to get it to work but the divide by zero errors are now gone 🙂
Final code looks like this:
Utilisation =
Var _a = [productive_time]
VAR _b=( [WorkingHours]-[non_productive_time])
return
divide(_a,_b,0)*100
@micklowe Hey,
you can write your dax like this.
Utilisation =
Var _a = [productive_time]
VAR _b=( [WorkingHours]-[non_productive_time])
return
= divide(_a,_b,0)*100
you can try above dax.
Thanks
Harish M
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
64 | |
56 | |
54 | |
36 | |
34 |
User | Count |
---|---|
85 | |
73 | |
55 | |
45 | |
43 |