The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi all,
I want to check, why I'm getting the wrong result for the divide function.
Below attached the table:
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:
Solved! Go to Solution.
@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
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
Proud to be a Super User!
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.
@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