Forum Discussion
divide function / measure provides wrong values
- Anonymous2 years ago
Hi td1n1z
For your question, here is the method I provided:
Here's some dummy data
"Dim"
"FACT"
Create a relationship between your two tables based on the 'ID' field.
Create a measure.
DIVIDE FUNCTION = DIVIDE( CALCULATE( SUM('FACT'[PAID]), 'FACT'[ID] IN VALUES('Dim'[ID]) && 'FACT'[ID] = MAX('FACT'[ID]) ), CALCULATE( SUM(Dim[quantity]), 'Dim'[ID] IN VALUES('FACT'[ID]) ) )Here is the result.
If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.
Regards,
Nono Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi td1n1z
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly