Forum Discussion
gclements
5 years agoHelper II
Calculated Column to Identify Rows Associated with Max Month
Hi, I am tring to create a calculated column called 'IsMax' which will flag the rows from the max month per ID. There may be more than one row per ID that relates to the max month. Below is a s...
- 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
gclements
5 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.
gclements
5 years agoHelper II
Just to be a bit clearer, I am trying to calculate the 'IsMax' column.