Forum Discussion
Relationship - value mismatch
- Anonymous5 years ago
Hi Anonymous ,
Please try this:
1. Add rank measure based on each Category and each Total value:
Rank = RANKX ( FILTER ( ALL ( 'Table' ), 'Table'[Category] = MAX ( 'Table'[Category]) && 'Table'[Total]=MAX('Table'[Total]) ), CALCULATE ( MAX ( ( 'Table'[Value]) ) ), , DESC )2. Sum values whose rank=1:
Sum = CALCULATE(SUM('Table'[Total]),FILTER('Table',[Rank]=1))The final output is shown below:
If it does not make sense, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Anonymous ,
Please try this:
1. Add rank measure based on each Category and each Total value:
Rank = RANKX (
FILTER ( ALL ( 'Table' ), 'Table'[Category] = MAX ( 'Table'[Category]) && 'Table'[Total]=MAX('Table'[Total]) ),
CALCULATE ( MAX ( ( 'Table'[Value]) ) ),
,
DESC
)
2. Sum values whose rank=1:
Sum = CALCULATE(SUM('Table'[Total]),FILTER('Table',[Rank]=1))
The final output is shown below:
If it does not make sense, please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.