Forum Discussion
Apply Filter Before Calculation
- Anonymous5 years ago
Hi mattterriault ,
Please create another new measure with below formula to replace the measure [Lowest Value] on the matrix:
Measure = SUMX ( VALUES ( 'Table'[Distance] ), SUMX ( VALUES ( 'Table'[Distance] ), [Lowest Value] ) )Or you can refer the method to fix the incorrect total value problem:
Fixing Incorrect Measure Totals
Why Your Total Is Incorrect In Power BI
Best Regards
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.
Try this measure. The reason that your calculated column did not work properly is that calculated columns are not affected by filter context.
Lowest Value =
VAR vScore =
MAX ( Table[Score] )
VAR vGroupMinValue =
CALCULATE ( MIN ( Table[Score] ), ALLSELECTED ( Table[Company] ) )
VAR vResult =
IF ( vScore = vGroupMinValue, 1, 0 )
RETURN
vResult
- mattterriault5 years agoFrequent Visitor
Thank you for responding. This works but it does not roll it up like the column calculation. The ultimate goal is to say " out of what is selected, how many times was company A the lowest, how many times was company B the lowest, etc....". I would like to not even have distance and size in the view, just the sum of the calculation you provided. Thanks again, I know I didnt clarify all that at the beginning.
- Anonymous5 years agoNot applicable
Hi mattterriault ,
Please create another new measure with below formula to replace the measure [Lowest Value] on the matrix:
Measure = SUMX ( VALUES ( 'Table'[Distance] ), SUMX ( VALUES ( 'Table'[Distance] ), [Lowest Value] ) )Or you can refer the method to fix the incorrect total value problem:
Fixing Incorrect Measure Totals
Why Your Total Is Incorrect In Power BI
Best Regards
Community Support Team _ Rena Ruan
If this post helps, then please consider Accept it as the solution to help the other members find it more.