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! Learn more

Reply
Scarwes
Regular Visitor

Error in PowerBi Measure

Hi, 

 

I am new to PowerBI, however I have found this weird behavior in just a few of my calculated values which gives me wrong total value. 

 

I have a measure called Royalty Amount based on this formula: 

Royalty Amount =
    SUMX(
        'InvoiceData',
        'InvoiceData'[Royalty Sales] * 'InvoiceData'[Royalty Rate]
    )
    InvoiceData
 
  • The Royalty Rate is a decimal number formatted to display four decimal places, and the column in the query is formatted identically. This precision is crucial for accurate calculation results.

  • However, I've noticed a discrepancy in the calculation for a specific customer, affecting certain product codes. I've attached a screenshot illustrating the miscalculation for your reference based on the formula above: Sales*Rate = Royalty Amount. 

Scarwes_2-1708393998183.png

 

 

I am only getting these miscalculations for the products of one specific customer. I am not sure if it is a rounding issue but I have tried countless things and still haven't gotten to the root of the problem. If you have any advice or any guidance, I would highly appreciate it. 

 
3 REPLIES 3
jdbuchanan71
Super User
Super User

If you add the caclulated column to the table then sum it up, does it give you the number you are expecting?

jdbuchanan71
Super User
Super User

Go to your 'InvoiceData' table and filter just to one of the customers that is giving the unexpected result.  My bet is, there are one or more lines where the Royalty Rate is something other than 0.0475.

Your SUMX is the same as adding a calcualted column to the 'InvoiceData' of 'InvoiceData'[Royalty Sales] * 'InvoiceData'[Royalty Rate] then putting a SUM over that calculated column.

I followed your advise and filtered for that one customer but all Royalty Rates for that specific customer, the invoices, and the highlighted products show 0.0475. 😞

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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