# DAX - Find max value based on another column being filtered



## Ormie (Jan 27, 2020)

Hello,

I have a column of financial values and I want to find the MAX value of that column when a certain value appears in another column.

I tried this but without any luck.

CALCULATE(
MAX('IntCustomSearchResults'[Value of Incident],
FILTER(IntCustomSearchResults,IntCustomSearchResults[Category]="Motor")
))

Thanks,

Chris


----------



## JustynaMK (Jan 28, 2020)

Hi Chris,

Good news is that you almost had it, you simply misplaced one bracket 

maxMotor = CALCULATE(
    MAX('IntCustomSearchResults'[Value of Incident]),
    FILTER(IntCustomSearchResults,IntCustomSearchResults[Category]="Motor")
)


----------



## Ormie (Jan 28, 2020)

Perfect, thank you for your help


----------

