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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Vallirajap
Resolver III
Resolver III

Hii all

I face one type of scenario newly. 
I have two measures. 
1. [measure1], It returns a value in minus (-254). This measure 1 has the addition of two more measures. 
           For example: Measure1 = [measure5] + [measure6] + [measure7]
2. [measure2], It returns the same value, which is 254. This measure also has a calculation of two more measures.

Now, I try to sum these two measures to get a value of 0. but the measure returns (1.45E-13).
New = [measure1] + [measure2]       //The value return is (1.45E-13).

When I try to subtract these two, it displays the correct answer.
New = [measure1] - [measure2]       // The value return is (508)

 

Why did it happen like this?. How do I get my solution?
 
Anybody know, please tell
Thanks in advance!
 

1 ACCEPTED SOLUTION
v-jingzhan-msft
Community Support
Community Support

Hi @Vallirajap 

 

1.45E-13 (scientific notation) is equivalent to 0.000000000000145 in decimal form. It is every close to zero. This happens as when doing the calculation, it may actually be calculated with the decimal numbers, so the result will have some small decimal places. To deal with it, we can give the result a specific number of digits after the decimal point. For example, if you want the result to be a whole number, you can use ROUND function 

New = ROUND([measure1] + [measure2], 0)

ROUND function (DAX) - DAX | Microsoft Learn

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

 

View solution in original post

3 REPLIES 3
v-jingzhan-msft
Community Support
Community Support

Hi @Vallirajap 

 

1.45E-13 (scientific notation) is equivalent to 0.000000000000145 in decimal form. It is every close to zero. This happens as when doing the calculation, it may actually be calculated with the decimal numbers, so the result will have some small decimal places. To deal with it, we can give the result a specific number of digits after the decimal point. For example, if you want the result to be a whole number, you can use ROUND function 

New = ROUND([measure1] + [measure2], 0)

ROUND function (DAX) - DAX | Microsoft Learn

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

 

Thank You @v-jingzhan-msft,
Thank you for your clear explanation and presentation. Your reply is very useful to us.

Regards,
@Vallirajap 


Glad it helps. You're welcome!

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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