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
KG1
Resolver I
Resolver I

Rounding Issue ( I think)

Hi

In my data the Orginal value and New AFP Value columns have a number of decimal places. 

I used the rounding function to 2 decimal places, then I created a new custom column (Status) which says if Original Value = New AFP Value then "Matched Payment" else "Variance"

In the example below it shows Variance when it should say "Matched Payment"

 

RefAFP ValueOriginal ValueNew AFP ValueStatus
12345843.83372.723372.72Variance

 

Any advice welcome - thank you in advance

2 ACCEPTED SOLUTIONS
PaulDBrown
Community Champion
Community Champion

You probably need one of the ROUND functions to convert the values. If you use the formatting options it just creates the format for displaying purposes, but doesn't actually convert the number itself.

 

https://dax.guide/round/ 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

v-xiaotang
Community Support
Community Support

Hi @KG1 

Thanks for reaching out to us.

If you use the round() function instead of just adjusting the display format, the result should not be wrong.

Could you share the sample file? so that we can test it to find the reason.

 

Kindly note: You can replace the raw data with bogus data to protect your private information. Thanks 🙂

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-xiaotang
Community Support
Community Support

Hi @KG1 

Thanks for reaching out to us.

If you use the round() function instead of just adjusting the display format, the result should not be wrong.

Could you share the sample file? so that we can test it to find the reason.

 

Kindly note: You can replace the raw data with bogus data to protect your private information. Thanks 🙂

 

 

Best Regards,

Community Support Team _Tang

If this post helps, please consider Accept it as the solution to help the other members find it more quickly.

Hi

I used the round.up fucntion and it fixed the problem

 

Number.RoundUp([AFP Value],2)

 

Thanks for your help

PaulDBrown
Community Champion
Community Champion

You probably need one of the ROUND functions to convert the values. If you use the formatting options it just creates the format for displaying purposes, but doesn't actually convert the number itself.

 

https://dax.guide/round/ 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






juncco888
Advocate I
Advocate I

What is the data type for AFP Value Original and Value New AFP?   Are they the same?  Did you round both to 2 decimal places?

Hi

Yes both rounded to 2 and both decimal number type

I tried to recreate the error with data I made up and could not duplicate it.  I created two columns and then a conditional column in power query and got the expected result.

One.JPG

two.JPG

I would be happy to try and assist further but would need your sample data and the specific DAX you attempted to use.  Please post if possible.

 

Thanks

Kyle

 

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.