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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ashmitp869
Responsive Resident
Responsive Resident

discripencies - dax (Power Bi and excel export)

Hi,

 

I am getting in Power Bi report as 11,127 as total

 

 

ashmitp869_0-1741930812640.png

What when export to excel -

ashmitp869_1-1741930864535.png



I have used dax query -

Cost = 
CALCULATE(
    SUMX(
        Plan_DailyPlanHoursResourceVersion,
        SWITCH(
            TRUE(),
            Plan_DailyPlanHoursResourceVersion[ResourceTypeDescription] = "Equipment",
                Plan_DailyPlanHoursResourceVersion[ApprovedStdHours] * RELATED(Core_ProjectEquipment[UnitCost]),
            Plan_DailyPlanHoursResourceVersion[ApprovedStdHours] * RELATED(Core_ProjectEmployee[StraightTimeRate])
        )
    )
    ,
    Plan_DailyPlanHoursResourceDetailVersion[IsActive] = TRUE(),
    Plan_DailyPlanHoursResourceDetailVersion[IsLatest] = TRUE(),
    Plan_DailyPlanHoursResourceVersion[DailyPlanStatusDescription] = "Approved"
)

What can be the cause of 5 dollar discripencies ? 

1 ACCEPTED SOLUTION

Instead of using Decimal (float) use Fixed Decimal

 

"The Fixed decimal number type is useful in cases where rounding might introduce errors. Numbers that have small fractional values can sometimes accumulate and force a number to be slightly inaccurate. The Fixed decimal number type can help you avoid these kinds of errors by truncating the values past the four digits to the right of decimal separator"

 

Details on data types in Power BI can be found here


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

View solution in original post

3 REPLIES 3
Deku
Super User
Super User

I assume in excel you did a sum of the cell return in the export. The difference is likely due to float data types. Floating point arithmetic on computers will always include some rounding errors, which will always compound (and get larger) the more arithmetic operations you do using the results. In Power BI the total is not calculated from the sum of the subtotal from the table, but is instead calculated independly. Therefore reducing the errors


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
ashmitp869
Responsive Resident
Responsive Resident

Hi,

 

Is there any way to resolve this ?

Instead of using Decimal (float) use Fixed Decimal

 

"The Fixed decimal number type is useful in cases where rounding might introduce errors. Numbers that have small fractional values can sometimes accumulate and force a number to be slightly inaccurate. The Fixed decimal number type can help you avoid these kinds of errors by truncating the values past the four digits to the right of decimal separator"

 

Details on data types in Power BI can be found here


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors