Forum Discussion

parkergeis's avatar
parkergeis
Helper II
1 year ago
Solved

Decimal Precision

I am running into an issue with some raw decimals being off by a very slight margin (< .0000001). From what I have gathered, this happens because Power Query stores these as float values and sometime...
  • v-tejrama's avatar
    v-tejrama
    1 year ago

    Hi parkergeis ,

    Thanks for reaching out to the Microsoft fabric community forum.

     

     

    You're totally right to expect raw decimal values to behave consistently, and it’s frustrating when that precision shifts slightly even though you haven't transformed anything and are using fixed decimal types.

     

    Even though your data is typed as Decimal or Fixed Decimal, the Direct Lake engine (which uses Spark and other backend tech) may still introduce tiny floating-point inaccuracies when reading or evaluating those numbers. That’s why you’re seeing values like 96,813.60000000001 instead of a clean 96,813.60 even though nothing's been changed.

    This behavior isn't unique to your setup, it’s a known issue caused by how some engines handle decimal math behind the scenes.

     

    To clean this up completely without needing to touch your Lakehouse or source, just create a calculated column in Power BI that explicitly rounds the value:

     

    Rounded Total Amount = ROUND('your_table'[total_amount], 2)

     

    Then use Rounded Total Amount in your visuals and calculations.

    This forces Power BI to treat the value exactly as you intend, with two decimal places and no extra noise from floating-point evaluations.

     

    If the response has addressed your query, please  "Accept it as a solution" and give a "Kudos"  so other members can easily find it.


    Best Regards,
    Tejaswi.
    Community Support