Forum Discussion
Cadams
4 years agoMicrosoft Employee
Lookupvalue - Max value with duplicate max values
Good evening, I'm wondering whether anyone can help. I'm trying to insert a new column in my table with a dax formula that returns the Primary Product based on the ID and max Value (see screensho...
tamerj1
4 years agoCommunity Champion
Hi Cadams
You can use
New Column =
VAR CurrentIDTable =
CALCULATETABLE ( Table1, ALLEXCEPT ( Table1, Table1[ID] ) )
VAR MaxValue =
MAXX ( CurrentIDTable, Table1[Value] )
VAR MaxValueProduct =
CALCULATE ( MAX ( Table1[Product] ), Table1[Value] = MaxValue )
RETURN
MaxValueProduct