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

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.

Reply
Anonymous
Not applicable

Appearing "-1E-14" instead of 0

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 0Screenshot 2022-03-25 142716.png

1 ACCEPTED SOLUTION
BA_Pete
Super User
Super User

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



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

2 REPLIES 2
BA_Pete
Super User
Super User

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



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Anonymous
Not applicable

Hi BA_Pete,
I found it as corrected, Thank you a lot for your prompt solution

Regards,
Rifdhy

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors