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.
Hi There,
I want to know why appearing "-1E-14" instead of 0 in power bi
For Eg:
I had created a measure that returns "Qty Available = Qty Delivered - Qty Withdrawn"
for some records, if Qty Available = 0 then it shows as "-1E-14" instead of 0
Solved! Go to Solution.
Hi @Anonymous ,
It means that you have very small, fractional, values in either your [Qty Delivered] or [Qty Withdrawn] columns.
You can fix this by adjusting your measure slightly:
// EITHER THIS:
_Qty Available =
VAR __qtyAvail = [Qty Delivered] - [Qty Withdrawn]
RETURN
IF(__qtyAvail < 0.5, 0, __qtyAvail)
//OR THIS:
_Qty Available = ROUND([Qty Delivered] - [Qty Withdrawn], X) //where X is the decimal places that meets your needs
Obviously you can change the 0.5 condition or the decimal places argument to meet your own preferred tolerance.
You could also remedy this in Power Query using the Number.Round function on your column values.
Pete
Proud to be a Datanaut!
Hi @Anonymous ,
It means that you have very small, fractional, values in either your [Qty Delivered] or [Qty Withdrawn] columns.
You can fix this by adjusting your measure slightly:
// EITHER THIS:
_Qty Available =
VAR __qtyAvail = [Qty Delivered] - [Qty Withdrawn]
RETURN
IF(__qtyAvail < 0.5, 0, __qtyAvail)
//OR THIS:
_Qty Available = ROUND([Qty Delivered] - [Qty Withdrawn], X) //where X is the decimal places that meets your needs
Obviously you can change the 0.5 condition or the decimal places argument to meet your own preferred tolerance.
You could also remedy this in Power Query using the Number.Round function on your column values.
Pete
Proud to be a Datanaut!
Hi BA_Pete,
I found it as corrected, Thank you a lot for your prompt solution
Regards,
Rifdhy
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.