Forum Discussion
Cadams
Microsoft Employee
4 years agoLookupvalue - 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
Community Champion
4 years agoHi 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