Forum Discussion
gmasta1129
Resolver I
1 year agoFind Largest Value, then pull value in another column based off each portfolio code
Hello, I am looking to create a new column where the formula pulls the value in column C, based off the highest value in column B. Also, this needs to be done by each portfolio code (column A). ...
- 1 year ago
HI gmasta1129 ,
You can achieve your goal by creating a new calculated colum using the following DAX:
New Column = VAR MaxValue = CALCULATE( MAX('Table'[Value]), ALLEXCEPT('Table', 'Table'[Portfolio Code Value]) ) RETURN CALCULATE( MAX('Table'[Value #2]), 'Table'[Value] = MaxValue, ALLEXCEPT('Table', 'Table'[Portfolio Code Value]) )Your table now should look like this:
- 1 year ago
Hi,
Write this calculated column formula
Column = LOOKUPVALUE(Data[Value #2],Data[Value],CALCULATE(max(Data[Value]),FILTER(Data,Data[Portfolio Code]=EARLIER(Data[Portfolio Code]))),Data[Portfolio Code],Data[Portfolio Code])Hope this helps.
Bibiano_Geraldo
Super User
1 year agoHI gmasta1129 ,
You can achieve your goal by creating a new calculated colum using the following DAX:
New Column =
VAR MaxValue =
CALCULATE(
MAX('Table'[Value]),
ALLEXCEPT('Table', 'Table'[Portfolio Code Value])
)
RETURN
CALCULATE(
MAX('Table'[Value #2]),
'Table'[Value] = MaxValue,
ALLEXCEPT('Table', 'Table'[Portfolio Code Value])
)
Your table now should look like this: