Aggr(Max(date) within If statement brings the wrong result
I would like to know if it is possible to highlight the max dates of an each ID and still have the rest of the dates remain in the table. I would my results to be like table 1 below. I have created a measure column with aggr(max(date1),ID) and it brings correct results with nulls but would like to avoid creating this coloumn as I need all dates. I put this inside an IF statement then I get the wrong results (table 2).
Table 1 - Desired Result
Using If(Aggr(Max(Date1),ID),yellow()) within the column background color expression -I keep getting the wrong result. I get the result below. Could I please get help with this?