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
Anonymous
Not applicable

Divide 2 measures but getting wrong result

Hi all,

 

I want to check, why I'm getting the wrong result for the divide function.

Below attached the table:

KerelKunci_0-1710835178464.png

I'm dividing 2 measures (Defect for DPPM measure & Order QTY DPPM measure) from 2 different tables.

 

Below are the DAX function for both measures:

Defect for DPPM = CALCULATE(SUM(LASERLog[# Defect for DPPM calculation]), FILTER(LASERLog, LASERLog[Quality Treatment] = "Product Quality" && LASERLog[Claim Status] = "Accept"))
Order QTY DPPM = CALCULATE(SUM(OrderShipment[Delivery quantity]), FILTER(OrderShipment, OrderShipment[Reporting Plant] = "Puchong Plant"))
 
This is the function for divide:
DPPM % = DIVIDE(
    [Defect for DPPM],OrderShipment[Order QTY DPPM]
)
 
I'm supposed to get for P01 0.384%.
 
Can someone help to check why I'm getting different/wrong result?
 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@PhilipTreacy  Thanks for your contribution on this thread.

Hi @Anonymous ,

Please update the formula of measure [DPPM %] as below and check if it can return your expected result...

DPPM % =
DIVIDE (
    SUMX ( VALUES ( 'Table'[Period] ), [Defect for DPPM] ),
    SUMX ( VALUES ( 'Table'[Period] ), OrderShipment[Order QTY DPPM] )
)

If the above one can't help you figure out, please provide some fake data in your tables (exclude sensitive data) with Text format and your expected result with special examples just as suggested by @PhilipTreacy 。

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

View solution in original post

3 REPLIES 3
PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Please supply your data as a file so people can use it on their own tests.  We can't easily use data posted as an image.

 

regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Hi Phil,

 

The data source is quite confidental, I'm afraid I cannot provide it.
But, after discussion with one of my colleague, we noticed that the denominator used in the calculation is taken from the total value of the order shipment, instead of order shipment by period.

Anonymous
Not applicable

@PhilipTreacy  Thanks for your contribution on this thread.

Hi @Anonymous ,

Please update the formula of measure [DPPM %] as below and check if it can return your expected result...

DPPM % =
DIVIDE (
    SUMX ( VALUES ( 'Table'[Period] ), [Defect for DPPM] ),
    SUMX ( VALUES ( 'Table'[Period] ), OrderShipment[Order QTY DPPM] )
)

If the above one can't help you figure out, please provide some fake data in your tables (exclude sensitive data) with Text format and your expected result with special examples just as suggested by @PhilipTreacy 。

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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