Forum Discussion
Calculated Column to Identify Rows Associated with Max Month
- 5 years ago
Hi gclements,
Could you check if this calculated column does the trick for you? For every Month record it will check whether the value is equal to the max month value of the associated ID.
MaxDatePerID = IF ( TestTable[Month] = CALCULATE ( MAX ( TestTable[Month] ), FILTER ( TestTable, TestTable[ID] = EARLIER ( TestTable[ID] ) ) ), 1, 0 )Hope it helps!
Regards,
Tim
Hi gclements
What's the logic behind which month is the Max?
For A you have flagged Jan, but for C you have flagged Dec?
Regards
Phil
- gclements5 years agoHelper II
It is to identify the maxium month value for each group. So for group A the maxium month is Jan-21, therefore all rows for Jan-21 are flagged, for group B it is Feb-21...etc.
- gclements5 years agoHelper II
Just to be a bit clearer, I am trying to calculate the 'IsMax' column.
- PhilipTreacy5 years agoSuper User
Your initial post had Dec21 in row 3 but I see that has now been corrected. So the logic is clear now. having Jan21 as the max didn't make sense with Dec21 in there.
Phil
- gclements5 years agoHelper II
Yes sorry, I noticed there was a slight mistake in one of the months.