Forum Discussion
Anonymous
2 years agoNot applicable
Identify max value in a column
I would like to create a custom column that returns the text " Latest Year" in any row where the year contains the max value. Status Year Budget 2024 Budget 2023 Budget 2022 ...
- 2 years ago
Anonymous
Yes you can:IF ( Tablename[Year] = CALCULATE( MAX( Tablename[Year] ), ALLEXCEPT( Tablename, Tablename[Status] ) ), "Latest Year" )
Dangar332
2 years agoResident Rockstar
HI, Anonymous
Anonymous
try below code for new column
just adjust your table name
Column =
var a= 'Table (2)'[status]
var b =
MAXX(FILTER('Table (2)','Table (2)'[status]=a),'Table (2)'[year])
return
IF('Table (2)'[year]=b,"latest year",BLANK())Table (2)'[status]=a),'Table (2)'[year])