# Power Bi: formula similar to Excel's MAXIFS with multiple criteria

In Power Bi I have a similar Table and I'm trying to figure out a way to calculate in column "G" the maximum value (only for Gender F) for each Team and each Day.

In Excel I would use something like this (although I would still need to figure out a way to manage duplicated values - rows highlighted in yellow)

=IF(AND([@Gender]="F";MAXIFS([Value];[Day];[@Day];[Team];[@Team];[Gender];"F") = [@Value]);MAXIFS([Value];[Day];[@Day];[Team];[@Team];[Gender];"F");"")

Anyway, I've written the Excel formula only to explain better the desiderd outcome, I do know that DAX's logic is different, but I can't find a way to make this work in Power Bi. I've managed to obtain the maximum value, but it's written on each row of the column, which is not what I want.

I've used this formula and I know that I should apply additional filters but my knowledge of DAX is close to none ...

Max Value = CALCULATE(MAX('MyTable'[Value]), ALLEXCEPT( 'MyTable', 'MyTable'[Team&Day]))

'MyTable'[Team&Day] is a column I've created in Power Bi by joining columns Team and Day

Any help is appreciated, thanks!

• Do you want to produce a calculated column or a measure? Apr 30, 2021 at 10:00
• It doesn't really matter to me at the moment (though I know it should and I know that there's a basic difference ). But I'm just using PowerBi to create a "cute" report for fun at the moment, so any solution would be good. I've used only columns so far because it's easier for me to instantly check if the outcome is ok and because I almost can't tell the difference between the two or use them appropriately. :) Apr 30, 2021 at 16:44