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
timg
5 years agoSolution Sage
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
Thanks for the solution. I have now realised that I have asked the wrong question as this will not resolve what I am trying to do. Nevertheless this is the answer to my question so I will mark it as so and ask another question in another post.