Forum Discussion
Anonymous
8 years agoNot applicable
Returning the max string value in a calculated column
Hello, Could someone help with the below please? In a calculated column, I need to return the max string for a filtered set of values for differnet records. If I was doing this in SQL I...
v-piga-msft
Resident Rockstar
7 years agoHi Anonymous,
Assuming that you have table like below.
And your desired output is the calculated column which return the max string value.
Please try the formula below.
Column =
VAR temp =
SUMMARIZE (
FILTER (
'Table1',
'Table1'[Task Code] IN { "TASK1A1", "TASK1A2", "TASK2A1", "TASK2A2" }
),
Table1[Ref No],
"Max Relevant Task Stage", CALCULATE ( MAX ( Table1[Task Code] ), VALUES ( Table1[Ref No] ) )
)
RETURN
MAXX (
FILTER ( temp, [Ref No] = EARLIER ( Table3[Ref No] ) ),
[Max Relevant Task Stage]
)
More details, you could refer to the attachment.
Best Regards,
Cherry