Forum Discussion
micklowe
1 year agoHelper I
Using the DIVIDE Function
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 ...
- 1 year ago
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.
ThanksHarish M
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
micklowe
1 year agoHelper I
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